Re: Memory usage
Mark Overmeer <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* David Nicol ([email protected]) [040315 21:38]: > Mark Overmeer wrote: > >In case I have forgotten to weaken one reference, somewhere, some > >parts of the data structure may be kept alive, even after a descruct(). > >This is close to impossible to debug... > > I'm speaking from ignorance here but would a "flush" or "clear" method > that would throw away the root objects help? No. When you close a folder, that reference is already forcefully cleaned-up. Three things may still show residual memory usage: 1) (parts of) messages which are still (accidentally?) referenced via other data-structures. 2) cyclic references (two data-structures refering to eachother) Somewhere a weaken should be added. 3) memory is, once received from the operating system, not given back to the OS even when it is not used anymore. Depends on the OS. -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net