Re: garbage collection thoughts... again?!
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: garbage collection thoughts... again?!
- From: Thatcher Ulrich <tu@...>
- Date: 2003年5月30日 11:26:55 -0400 (EDT)
On 2003年5月30日, [iso-8859-1] Tobias K舖 wrote:
> As the question required the list to be kept existend by a pointer to _any_
> element in the list, the solution you gave is insufficient. If the pointer
> does not point to the first entry, the weak part will get lost. If you make
> the weak part strong you have cycles ;-)
Hm, true. What we typically do in practice: use raw pointers for the
internal links, and keep the objects alive through other means
(e.g. have strong references in an array somewhere).
-Thatcher