typeid + toString = runtime error
Andrej Mitrovic
andrej.mitrovich at gmail.com
Sun Dec 30 16:30:45 PST 2012
On 2012-12-30 17:04, Ali Çehreli wrote:
>>> Application error:
>>> core.exception.InvalidMemoryOperationError
The basic rule is don't call or do anything which can allocate memory
in a destructor. printf doesn't allocate, and if you don't do anything
that allocates you should be ok.
Maybe the compiler should warn or error on attempts to allocate memory
(implicitly or explicitly) in a dtor. Not sure..
More information about the Digitalmars-d-learn
mailing list