strange work of GC

FG via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Feb 7 03:13:26 PST 2015


On 2015-02-07 at 12:02, Andrey Derzhavin wrote:
> If a "destroy" method is used together with GC inside of my app,it makes my app unstable.
> In this case I need to choose how to destroy my objects: 1) always manually by method "destroy", but without GC; 2) or always automatically by GC, but without using the "destroy" method.
> In the first case I need to know how can I disable the automatic GC in my app?
> In the second case - how can I disable the "destroy" method calls inside of my app?

Why do you want to use destroy? Put GC.collect() after the call to fn1 and GC cleanup will work just fine[1], I've checked. Are you talking about a different program now?

[1] Assuming that you compile the program as 64-bit and not 32-bit.


More information about the Digitalmars-d-learn mailing list