Memory Leak Fixed
Have to free the mesh generator after we process our mesh.
This commit is contained in:
@@ -93,6 +93,8 @@ func _draw():
|
||||
|
||||
var meshGenerator = GeoPolyMesh.new(vector_indexes, vectors, extrusion_direction, depth)
|
||||
var commited_mesh = meshGenerator.commit_mesh(meshInstance3d.get_active_material(0))
|
||||
meshGenerator.free()
|
||||
|
||||
|
||||
meshInstance3d.mesh = commited_mesh
|
||||
meshInstance3d.position += depth_position_offset
|
||||
@@ -112,6 +114,7 @@ func _re_draw():
|
||||
|
||||
var meshGenerator = GeoPolyMesh.new(vector_indexes, vectors, extrusion_direction, depth)
|
||||
var commited_mesh = meshGenerator.commit_mesh(meshInstance3d.get_active_material(0))
|
||||
meshGenerator.free()
|
||||
|
||||
meshInstance3d.mesh = commited_mesh
|
||||
meshInstance3d.create_trimesh_collision()
|
||||
|
||||
Reference in New Issue
Block a user