mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix C++ invokes being responsible for destroying python callbacks
* If the last refcount on a python lambda/temp function is released when a wrapping std::function is destroyed in a C++ invoke, we can't destroy it safely. Instead we queue up that decref and process it the next chance we're able (which is either when the current execution finishes for a python shell execution, or on the next function call which handles extensions).
This commit is contained in:
@@ -64,4 +64,12 @@ extern "C" void SetThreadBlocking(PyObject *global_handle, bool block)
|
||||
{
|
||||
}
|
||||
|
||||
extern "C" void QueueDecRef(PyObject *obj)
|
||||
{
|
||||
}
|
||||
|
||||
extern "C" void ProcessDecRefQueue()
|
||||
{
|
||||
}
|
||||
|
||||
REPLAY_PROGRAM_MARKER()
|
||||
|
||||
Reference in New Issue
Block a user