Skip to content
Snippets Groups Projects
Commit 7dda27fc authored by Stephen Swaney's avatar Stephen Swaney
Browse files

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.
parent 6fbd4e3e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment