Bug 3460 – Allow calllng of class c'tors through methods other than new
Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2009-10-31T13:30:00Z
Last change time
2015-06-09T01:26:56Z
Assigned to
nobody
Creator
dsimcha
Comments
Comment #0 by dsimcha — 2009-10-31T13:30:16Z
There used to be a way (described here) to allocate class instances using custom allocation schemes, without modifying the code to the actual class. Apparently, calling f._ctor(args) doesn't work anymore. Please start allowing this again, as I really need it to create a method of allocating class instances w/ the new precise heap scanning stuff I'm working on.
Comment #1 by dsimcha — 2009-10-31T13:38:16Z
Never mind, I just realized it's __ctor and it only works if the class has a constructor.