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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/python_api/examples/bmesh.ops.1.py2
-rw-r--r--release/scripts/templates/bmesh_simple.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/doc/python_api/examples/bmesh.ops.1.py b/doc/python_api/examples/bmesh.ops.1.py
index 2eefb63a23d..abce087ceb3 100644
--- a/doc/python_api/examples/bmesh.ops.1.py
+++ b/doc/python_api/examples/bmesh.ops.1.py
@@ -95,6 +95,8 @@ bmesh.ops.rotate(
# Finish up, write the bmesh into a new mesh
me = bpy.data.meshes.new("Mesh")
bm.to_mesh(me)
+bm.free()
+
# Add the mesh to the scene
scene = bpy.context.scene
diff --git a/release/scripts/templates/bmesh_simple.py b/release/scripts/templates/bmesh_simple.py
index 656febf4918..45e6b52d578 100644
--- a/release/scripts/templates/bmesh_simple.py
+++ b/release/scripts/templates/bmesh_simple.py
@@ -19,3 +19,4 @@ for v in bm.verts:
# Finish up, write the bmesh back to the mesh
bm.to_mesh(me)
+bm.free() # free and prevent further access