[Bf-blender-cvs] [6d5d1d8a560] usd-importer-T81257-merge: USD Import: USDPrimReader comments.
makowalski
noreply at git.blender.org
Wed Jun 23 02:57:16 CEST 2021
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();
More information about the Bf-blender-cvs
mailing list