newbie question - remove a module from ram
Michael Hudson
mwh at python.net
Mon May 10 13:42:13 EDT 2004
john fabiani <jfabiani at yolo.com> writes:
> Paul McGuire wrote:
> > So then what if he follows up with:
> > del sys.modules["random"]
> > Are there any other dangling references to this module that would
> > stymie the
> > garbage collector (assuming that the OP hasn't saved off his own reference
> > to the module)?
> > -- Paul
> >
> I think I follow: but doesn't the garbage collector decide what is to
> be done? Assuming that there were no dangling references wouldn't
> the ram be available for re-use?
Well, that depends on vagaries of your allocator, but probably.
Why are you so worried about the RAM your modules take up?
Cheers,
mwh
--
The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offence.
-- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5
More information about the Python-list
mailing list