
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 20 April 2009, Simonson, Lucanus J wrote:
be too much of a burden, and if I wanted to be lazy I could use shared pointers to do the reference counting instead of using a GC library with equal extra effort. I don't want to be lazy, and I don't want to debug
A garbage collector does have an advantage over shared_ptr reference counting, in that it can automatically detect cycles. Although, it does seem like it should be possible to detect shared_ptr cycles by keeping track of the memory regions owned by shared_ptrs and comparing them with the addresses of shared_ptr objects. Then you could build up a graph which could be checked for cycles and connectedness. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkns0+EACgkQ5vihyNWuA4VZPgCePlGKibaauHBkU+V7ntH+H/3n 6JUAn33H8zOSdgHfEUjPcbl1SSUWV5T5 =wPWq -----END PGP SIGNATURE-----