[NumPy-Tickets] [NumPy] #2048: memory overflow when using numpy load in a loop

NumPy Trac numpy-tickets@scipy....
Sat Feb 11 18:44:55 CST 2012


#2048: memory overflow when using numpy load in a loop
---------------------------------------------------+------------------------
 Reporter:  eldada                                 |       Owner:  somebody   
     Type:  defect                                 |      Status:  new        
 Priority:  normal                                 |   Milestone:  Unscheduled
Component:  numpy.lib                              |     Version:  1.5.1      
 Keywords:  load, memory, leak, overflow, NpzFile  |  
---------------------------------------------------+------------------------
Changes (by pv):

  * component:  Other => numpy.lib


Comment:

 Adding `gc.collect()` inside the loop fixes the issue for me. There's
 indeed a reference cycle, but that's not a real bug, as the garbage
 collector catches it. (Although we could set `self.f = None` inside
 `close()` to break the cycle automatically.)

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2048#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list