mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-08-14 07:23:43 -04:00
MISC4: Fix ref count of VisualDataDistributor (harmless, currently unused)
This commit is contained in:
@@ -142,7 +142,12 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (inp) {
|
if (inp) {
|
||||||
|
int previousRefCount = inp->getRefCount();
|
||||||
VisualProcessor<OutputDataType, OutputDataType>::distribute(inp);
|
VisualProcessor<OutputDataType, OutputDataType>::distribute(inp);
|
||||||
|
//inp is now shared through the distribute(), which overwrite the previous ref count,
|
||||||
|
//so increment it properly.
|
||||||
|
int distributeRefCount = inp->getRefCount();
|
||||||
|
inp->setRefCount(previousRefCount + distributeRefCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user