Adam D. Ruppe's "D Cookbook" now available!

Adam D. Ruppe via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu May 29 07:50:11 PDT 2014


On Thursday, 29 May 2014 at 13:01:50 UTC, Szymon Gatner wrote:
> - point 5 (of How to do it...) says: "... and free the object 
> if necessary", but then in code:

Sorry, I typed this answer but forgot to actually post it. But to 
keep the example focused on postblit and destructor stuff instead 
of malloc/free so I used the writeln instead of the actual calls.

So all you'd have to do is do free() where it says "Destroyed" 
instead and alloc in the ctor.


More information about the Digitalmars-d-announce mailing list