Commit: 6d5d1d8a560f9792f0b7c8aba4e5a63c31b2bd73
Author: makowalski
Date:   Tue Jun 22 20:11:09 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB6d5d1d8a560f9792f0b7c8aba4e5a63c31b2bd73

USD Import: USDPrimReader comments.

Added comments regarding reference counting.

===================================================================

M       source/blender/io/usd/intern/usd_reader_prim.h

===================================================================

diff --git a/source/blender/io/usd/intern/usd_reader_prim.h 
b/source/blender/io/usd/intern/usd_reader_prim.h
index f212f617140..d5f90cdd8a1 100644
--- a/source/blender/io/usd/intern/usd_reader_prim.h
+++ b/source/blender/io/usd/intern/usd_reader_prim.h
@@ -112,6 +112,15 @@ class USDPrimReader {
     parent_reader_ = parent;
   }
 
+  /* Since readers might be referenced through handles
+   * maintained by modifiers and constraints, we provide
+   * a reference count to facilitate managing the object
+   * lifetime.
+   * TODO(makowalski): investigate transitioning to using
+   * smart pointers for readers, or, alternatively look into
+   * making the lifetime management more robust, e.g., by
+   * making the destructors protected and implementing deletion
+   * in decref(), etc. */
   int refcount() const;
   void incref();
   void decref();

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to