johnvamba / papervision3d

Automatically exported from code.google.com/p/papervision3d
0 stars 0 forks source link

Memory leak / increase over time #266

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a standard scene, but use the QuadrantRenderEngine.
2. Add a number of cubes, say 20, in a grid formation of 5x4.
3. Render the scene on an enter_frame bases. Now check the memory by
writing System.totalMemory into a textfield, somewhere on the stage.

What is the expected output? What do you see instead?
Expected is a steady memory usage. Instead, it grows by a small amount each
frame.

What version of the product are you using? On what operating system?
Papervision3D 2.0.0 (March 12th, 2009)

Please provide any additional information below.
I am creating an application that is supposed to run about 12-14 hours, but
if memory keeps increasing, it could cause a problem.

Although GC does its job about every 30 seconds, each cycle leaves a small
part untouched. Without GC, it counts up about 10-100 bytes each frame,
resulting in an average increase of 5-6 kb every minute. After a GC
cleanup, it goes back to where it started before the render, plus a few
tenths of a kb. So after GC, the starting memory has increased by a little.
This means that over a longer period of time, memory will have increased by
a lot.

Example of my app so far:
start: 30kb
after ~30 seconds of render: 33kb
after GC cleanup: 30.1kb
start again, and after ~30 seconds of render: 33.1kb
after GC cleanup: 30.2kb
etc.

Even though this isnt a big issue, because Im talking about an increase of
bytes per minute, I think its still something to be looked at. Especially
when creating apps that are going to run for several hours.

Original issue reported on code.google.com by emronisan@gmail.com on 23 Apr 2010 at 9:56

GoogleCodeExporter commented 8 years ago
Wael Jammal have written some extends to have pV3D destroyable objects.
But the web site has gone. I have a copy of the code on my local disk.
Please pv3D team provide a dispose() method on your objects.

Garbage collector is not God, it remove objects with no references.

Original comment by damien.miras on 18 May 2010 at 11:10