Files
renderdoc/qrenderdoc/Code
Wang, Xiong c3548cd16a Fix Python callback reference counting and shutdown cleanup
Clear the argument tuple after calling a Python callback so varfunc's
destructor cannot decrement it a second time. This prevents repeated
zero-argument callbacks from losing references to the shared empty tuple.

Skip callback reference cleanup after Python has shut down, since Qt can
destroy pending callback closures during QApplication teardown.

Validation:
- Regression harness using this header and bundled Python 3.6.4: 20,000
  callbacks with balanced references, nonempty arguments, exception paths,
  deferred release, and callback destruction after Py_Finalize.
- Windows x64 Release build: no warnings or errors.
- MI 8 remote replay: 1.rdc -> 2.rdc -> 1.rdc -> 2.rdc; normal exit with
  a pending callback, exit code 0.

Build and device checks used the existing development checkout, which also
contains separate local changes excluded from this commit.
2026-10-09 21:32:37 +09:00
..