Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-01-01 18:59:23 +0300
committermano-wii <germano.costa@ig.com.br>2019-01-02 14:32:24 +0300
commitf6819fe26e6c5abd00bebc45f14fc679fa5cc259 (patch)
tree9e7a8d3887656b9648c2319eb44f676a3860090c /mesh_snap_utilities_line/snap_context_l/mesh_drawing.py
parentcbf69932d32612bdf8c5b2557c9affdd4003770c (diff)
mesh_snap_utilities_line: fix ram and vram leakage
Diffstat (limited to 'mesh_snap_utilities_line/snap_context_l/mesh_drawing.py')
-rw-r--r--mesh_snap_utilities_line/snap_context_l/mesh_drawing.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/mesh_snap_utilities_line/snap_context_l/mesh_drawing.py b/mesh_snap_utilities_line/snap_context_l/mesh_drawing.py
index 76b9a1d4..b8e61799 100644
--- a/mesh_snap_utilities_line/snap_context_l/mesh_drawing.py
+++ b/mesh_snap_utilities_line/snap_context_l/mesh_drawing.py
@@ -386,12 +386,18 @@ class GPU_Indices_Mesh():
def get_loosevert_index(self, index):
return self.looseverts[index]
-
- def __del__(self):
+ def free(self):
if len(self.users) == 1:
- GPU_Indices_Mesh._Hash.pop(obj.data)
-
- self.user.remove(self)
+ GPU_Indices_Mesh._Hash.pop(self.obj.data)
+ del self.batch_tris
+ del self.batch_edges
+ del self.batch_lverts
+ del self.verts_co
+ del self.tri_verts
+ del self.edge_verts
+ del self.looseverts
+
+ self.users.remove(self)
#print('mesh_del', self.obj.name)