Type Aware GC Questions

Walter Bright newshound at digitalmars.com
Sun Jan 28 01:30:28 PST 2007


Craig Black wrote:
> I was wondering, just how smart is the compiler now?  If I define a class
> that doesn't have any pointers, then will the compiler know that it doesn't
> have pointers? 

Yes.

> If I only have one pointer in my class, will the GC only
> scan that location?

No, it'll scan the whole class. All it has is a bit that says "might 
have pointers" or "has no pointers".



More information about the Digitalmars-d mailing list