Blender Git Loki

Git Commits -> Revision 4474c45

March 12, 2021, 03:53 (GMT)
USD Import: fix reader refcount error.

Currently, USDPrimReader reference counts aren't correctly
maintained because the readers are stored in two separate
arrays, in the USDStageReader instance and also in the
import job data, but the reference counts for the readers
is incremented only once. I changed the logic to store
the readers only in the USDStageReader. Now also deleting
the stage reader instance, fixing a small memory leak. Also,
simplified the syntax for for looping over readers, to make
the code more readable.

Commit Details:

Full Hash: 4474c45e6129461c34905ae96caa5cc0d73c37b4
Parent Commit: db2168d
Lines Changed: +77, -69

3 Modified Paths:

/source/blender/io/usd/intern/usd_capi.cc (+47, -46) (Diff)
/source/blender/io/usd/intern/usd_reader_stage.cc (+20, -13) (Diff)
/source/blender/io/usd/intern/usd_reader_stage.h (+10, -10) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021