Blender Git Loki
Git Commits -> Revision 7dda27f
Revision 7dda27f by Stephen Swaney (master) October 14, 2004, 17:35 (GMT) |
followup to vector memory leak fixes: fix for problems with NMesh vertices. plug some more leaks in matrix module. new vector method newVectorProxy(). In BPy-Land, we have overloaded the meaning of our Vector type. One use is for vectors in the traditional mathmatical sense. The other legacy use is as a proxy for Blender data. The recent memory leak fixed have lead to the Vector type behaving as mathematical vectors. However, the NMesh module is still using Vector types as a proxy to manipulate NMVert data. To support this usage, in the vector module there is a new factory method newVectorProxy(). This creates a Vector that references memory outside the Vector. Vectors created by newVectorProxy() do NOT free their referenced memory. The newVectorProxy() is used only in bpy code and is not exposed thru the scripting interface. Anyone using newVectorProxy() must be aware of object lifetime and scoping issues because the returned Vector holds a pointer to memory it does not own. This works in the NMVert case since we are referencing memory belonging to the NMVert object via an NMVert method. |
Commit Details:
Full Hash: 7dda27fcd7266befeb9c8f191726154831438b59
SVN Revision: 3257
Parent Commit: 6fbd4e3
Lines Changed: +53, -13