Re: Possible memory leak

Bruce Sherwood <[email protected]>
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
Following your suggestion, I tried the following in VPython 5.4 on
Python 2.7 in Windows 7

from visual import *
N = 1000000
pts = ones(N*3).reshape(N,3)
while True:
    c = curve(pos=pts)
    c.visible = False
    del c

Is this something like what you did? I watch the Windows Task Manager
and cannot see any change in the memory usage.

Bruce Sherwood

On Fri, Oct 29, 2010 at 8:38 AM, Beracah Yankama <[email protected]> wrote:
> hah!  now i'm not the only one who noticed this!  i was graphing a lot
> of data too with lots of curves (a graph cluster growing to thousands of
> nodes and edges, which are dynamically positioned), but after like 200
> edges and being repositioned, an out of memory error gets thrown.  I had
> tracked it down to vpython.
>
> I had written (in case it is helpful to you):
> """
> I made a test script, that only
> creates objects in the window, then deletes them over and over, and I
> found the long-term memory use/growth to be related linearly to the .pos
> attribute.  For instance, a curve with 20 points leads to unreleased
> memory that grows 10x as fast as curves with only 2 points.  Similarly,
> if I assign the .pos attribute as a numpy ndarray directly, the leak
> grows twice as fast as if assign the individual xyz values.
> """
>
> B
>

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.