On Wed, May 27, 2015 at 9:05 AM, Michael Turok <[email protected]> wrote: > Thanks folks! I guess that's also why WeakRef() isn't documented. ;-)
That's probably not a good reason for not documenting it. I guess it probably needs document as a exported symbol although I'm not sure what it is meant to be used for (interfacing with external library?) > > On Tuesday, May 26, 2015 at 4:06:29 PM UTC-4, Stefan Karpinski wrote: >> >> Yes, that's right. Cycles are collected by mark-and-sweep GC – when a >> cyclic structure is no longer reachable, none of it is marked, allowing it >> to be freed during the sweep phase. >> >> On Tue, May 26, 2015 at 11:37 AM, Yichao Yu <[email protected]> wrote: >>> >>> On Tue, May 26, 2015 at 11:31 AM, Michael Turok <[email protected]> >>> wrote: >>> > In looking at the manual for incompletely initialized classes (click >>> > here), >>> > with an example of a SelfReferential class, wouldn't you want to wrap >>> > this >>> > in a WeakRef()? >>> > >>> > Or does the GC know what to do when it encounters a circular reference >>> > already? >>> >>> AFAICT, circular reference is only an issue for reference counting. >>> Julia's mark and sweep GC doesn't have that problem. >>> >>> > >>> > Thanks, >>> > Michael >> >> >
