Re: deleting objects present in a list

2010-04-22 Thread Sandy
On Apr 21, 10:48 am, Dave Angel wrote: > (For some reason you posted your response before the message you were > replying to.  That's called Top-posting, and is bad form on these > mailing lists) > > > > Sandy wrote: > > Thanks for the replies. > > > Terry, > > What does 'immediately' mean? I did

Re: deleting objects present in a list

2010-04-21 Thread Dave Angel
(For some reason you posted your response before the message you were replying to. That's called Top-posting, and is bad form on these mailing lists) Sandy wrote: Thanks for the replies. Terry, What does 'immediately' mean? I did a small test and here are the results. import psutil def tes

Re: deleting objects present in a list

2010-04-20 Thread Chris Rebert
> On Apr 20, 8:44 pm, Terry Reedy wrote: >> On 4/20/2010 3:21 PM, Sandy wrote: >> > Hi all, >> > I have large number of objects created and to handle them properly, I >> > store them in a list. How can I delete all of these objects (delete I >> > mean here is to remove the object from memory not j

Re: deleting objects present in a list

2010-04-20 Thread Sandy
Thanks for the replies. Terry, What does 'immediately' mean? I did a small test and here are the results. import psutil def testing(): class Object(): pass l = {} apm = psutil.avail_phymem()/(1024*1024) print 'Before creating objs: ' + repr(apm) for i in xrange(5000

Re: deleting objects present in a list

2010-04-20 Thread Terry Reedy
On 4/20/2010 3:21 PM, Sandy wrote: Hi all, I have large number of objects created and to handle them properly, I store them in a list. How can I delete all of these objects (delete I mean here is to remove the object from memory not just from list)? I cannot use the list to iterate through the ob

Re: deleting objects present in a list

2010-04-20 Thread Chris Rebert
On Tue, Apr 20, 2010 at 12:21 PM, Sandy wrote: > Hi all, > I have large number of objects created and to handle them properly, I > store them in a list. How can I delete all of these objects (delete I > mean here is to remove the object from memory not just from list)? I > cannot use the list to i

deleting objects present in a list

2010-04-20 Thread Sandy
Hi all, I have large number of objects created and to handle them properly, I store them in a list. How can I delete all of these objects (delete I mean here is to remove the object from memory not just from list)? I cannot use the list to iterate through the objects to delete them. Because 'del' o