weak pointers for Objects and delegates pointing to Objects

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Oct 26 00:41:14 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Baxter schrieb am 2006-10-26:
> Thomas Kuehne wrote:
>
>> Who said D didn't support weak pointers?
>
> So is this "problem solved?"  Are there any issues or limitations with 
> the weak pointer code you posted?  If not, Great!

Limitation:
Only objects and delegates pointing to object member functions are
supported.

I haven't yet looked through the GC code, but adding support
for all GC allocated types ought to be possible without major changes
there. Weak pointers to array elements though will most likely be impossible
without major changes.

Using GCC/GDC's "-finstrument-functions" should allow weak pointers for
all types stored on the stack as a pure library implementation. For
DMD that would require "-profile" as well as hijacking internal/trace.d.

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFFQFysLK5blCcjpWoRAn+bAJsHxPYr/RNgDN76OZgyydWq0b6cSgCgkjag
zP+m/bxMAq2vCt9KY4L0Nvc=
=Xu4O
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-learn mailing list