[Bf-python] Scriptlink memory link

Campbell Barton cbarton at metavr.com
Sun Oct 15 00:56:15 CEST 2006


Its not a memory leak exactly, your making a new mesh each time the 
script runs
Ken hows about Mesh.Unlink() for zero user meshes?

the best solution is to make a dummy mesh
Mesh.New('some_dummy')
and reuse it. youll need to add some checks to get teh dummy if it 
alredy exists.

also BPyMesh.getMeshFromObject() will make a new mesh, but look at the 
args in BPyMesh.py and youll see it can accept a dummy mesh.


Yehoshua Sapir wrote:
> On 10/14/06, *Campbell Barton* <cbarton at metavr.com 
> <mailto:cbarton at metavr.com>> wrote:
>
>     just tested and I dont get any errors while running or once quit, how
>     recent is your build of blender?
>
>
> From tonight.
>
> I'm not getting any errors like Blender crashing. I mean Blender's 
> memory usage goes up and doesn't come back down. (until I quit, but 
> that doesn't count. :-)
>  
>
>     Yehoshua Sapir wrote:
>     > When scriptlinks are enabled, I get a memory leak every time I
>     switch
>     > frames (it's a FrameChanged scriptlink)
>     >
>     > Here's the file:
>     >
>     >
>     http://projects.blender.org/sharea/index.php?action=downloadfile&filename=antenna2.blend&
>     <http://projects.blender.org/sharea/index.php?action=downloadfile&filename=antenna2.blend&>
>     >
>     <http://projects.blender.org/sharea/index.php?action=downloadfile&filename=antenna2.blend&
>     <http://projects.blender.org/sharea/index.php?action=downloadfile&filename=antenna2.blend&>>
>     >
>     > I'm running Blender from current CVS on Linux.
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Bf-python mailing list
>     > Bf-python at projects.blender.org
>     <mailto:Bf-python at projects.blender.org>
>     > http://projects.blender.org/mailman/listinfo/bf-python
>     <http://projects.blender.org/mailman/listinfo/bf-python>
>     >
>
>
>     --
>     Campbell J Barton
>
>     133 Hope Street
>     Geelong West, Victoria 3218 Australia
>
>     URL:    http://www.metavr.com
>     e-mail: cbarton at metavr.com <mailto:cbarton at metavr.com>
>     phone: AU (03) 5229 0241
>     _______________________________________________
>     Bf-python mailing list
>     Bf-python at projects.blender.org <mailto:Bf-python at projects.blender.org>
>     http://projects.blender.org/mailman/listinfo/bf-python
>
>


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list