+The ``remove()`` api calls will invalidate the data they free to prevent common mistakes.
+
+The following example shows how this precortion works.
+
+.. code-block:: python
+
+ mesh = bpy.data.meshes.new(name="MyMesh")
+ # normally the script would use the mesh here...
+ bpy.data.meshes.remove(mesh)
+ print(mesh.name) # <- give an exception rather then crashing:
+
+ # ReferenceError: StructRNA of type Mesh has been removed
+
+
+But take care because this is limited to scripts accessing the variable which is removed, the next example will still crash.
+
+.. code-block:: python
+
+ mesh = bpy.data.meshes.new(name="MyMesh")
+ vertices = mesh.vertices
+ bpy.data.meshes.remove(mesh)
+ print(vertices) # <- this may crash