Garbage collector collects live objects
Ruslan Mullakhmetov via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Dec 10 00:46:11 PST 2014
On Tuesday, 9 December 2014 at 21:38:57 UTC, Steven Schveighoffer
wrote:
> On 12/9/14 2:56 PM, Steven Schveighoffer wrote:
>> On 12/9/14 12:40 PM, Ruslan Mullakhmetov wrote:
>
>>> array holds 11 64bit pointers but it's block size is only 128
>>> bytes < 11
>>> * 64 = 704 bytes. what's wrong with this arithmetics?
>
> Hah, just realized what's wrong. It's not 64 *bytes* per
> pointer, it's 64 *bits*. So 8 bytes.
>
> 11 * 8 == 88.
>
> Starting to sound more and more normal...
>
> -Steve
yes. that was the mistake. also after fixing bug in Blk
Attributes printing i got more reasonable attrs
for object blk: FINALIZE
for array of objects blk: NO_SCAN APPENDABLE
this is sound good except for NO_SCAN.
I did simple test file in which allocate array of Foo objects
(http://dpaste.dzfl.pl/89ab00a897f6)
there i see blk attrs only APPENDABLE without NO_SCAN.
as far as i understand GC will not scan this array for references
and those if the only reference to object is stored in this array
will not see it, those assume this object as **not** referenced
and collects it, am i right?
the other question why this happens... try to debug more.
More information about the Digitalmars-d-learn
mailing list