Re: GC BlkAttr clarification. Programming in D pages 671, 672. About GC

2025-09-04 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Sep 03, 2025 at 07:56:03PM +, Brother Bill via Digitalmars-d-learn wrote: > It appears that D has multiple ways of determining which created > objects are subject to GC. No. The GC knows which memory address ranges it manages, and any pointer that fall outside of those ranges will be

Re: GC BlkAttr clarification. Programming in D pages 671, 672. About GC

2025-09-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On Wednesday, 3 September 2025 at 23:05:45 UTC, H. S. Teoh wrote: On Wed, Sep 03, 2025 at 07:56:03PM +, Brother Bill via Digitalmars-d-learn wrote: [...] C, C++ and D can play shenanigans with pointers, such as casting them to size_t, which hides them from the GC. D's current GC is conser

GC BlkAttr clarification. Programming in D pages 671, 672. About GC

2025-09-03 Thread Brother Bill via Digitalmars-d-learn
It appears that D has multiple ways of determining which created objects are subject to GC. For class instances, new creates a new class instance, returning a pointer to it. While "alive", other pointers may also point to the class instance. Once no pointers are pointing to this class insta