Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: forcing guile to collect *all* garbage?
Jon Trowbridge <firstname.lastname@example.org> writes:
> On Mon, Apr 12, 1999 at 05:27:25PM -0230, Greg Harvey wrote:
> > Jon Trowbridge <email@example.com> writes:
> > > Is there anything that I can do to trigger an "aggressive" garbage
> > > collection in guile, in which the whole heap would be scanned and I
> > > could be sure afterwards that every lingering unreferenced object had
> > > been deallocated?
[ Note: the following is a general comment, not necessary relevant
to your problem. ]
In general, you should not assume that GC guarantees that all
unreferenced objects are freed. GC's job is to automate memory
management for you, no more and no less. If you want reliable
deallocation, use other means (i.e. deallocate things explicitly in
one way or another). That said, Guile's current GC _can_ be relied
upon to scan and free everything. It's not something you should
expect to remain true forever, though.
> > or that something
> > you don't know about is holding a reference to it (the printer is
> > currently very bad in this regard).
Yup, I noticed that too.
Try something like the following and see if the problem persists:
guile> (begin (date 1 1 2000) 'foo) ; construct an object but don't
; show it to the printer.
Guile Home |
Main Index |