Garbage collector collects live objects
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Dec 9 18:43:05 PST 2014
On Tue, 09 Dec 2014 17:18:44 +0000
Ruslan Mullakhmetov via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:
> thanks, I got it: either C++ or D dtors are minefield =)
and in D this is filed *made* of mines. ;-)
> but i still have no clue how to overcome GC =(
why do you want to fight with GC? most of the time GC is your friend.
are you trying to have predictable finalization? you don't have to
fight with GC in this case too, there are alot of other methods.
wrapper structs, `scoped!`, `RefCounted` and so on. you can have weak
references too (this is a hack, but it should work until we got
compacting (or precise?) GC ;-).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141210/2941ed7d/attachment-0001.sig>
More information about the Digitalmars-d-learn
mailing list