How to destruct class instances allocated by a Region-allocator over a single GC block

Per Nordlöw per.nordlow at gmail.com
Mon Apr 9 14:51:24 UTC 2018


On Monday, 9 April 2018 at 13:51:47 UTC, Steven Schveighoffer 
wrote:
> Well, you know the type, because make returned it no? The 
> contract is, you call obj = make!X(args), then you have to call 
> dispose(obj), where obj is of the type X. That's how it knows.
>
> If you are thinking you want to destroy the whole block at once 
> (typed as void[]), that's not how it works.
>
> stdx.allocator is not going to help you with GC collection, 
> it's not geared towards that purpose.

Ok, thanks!


More information about the Digitalmars-d-learn mailing list