Unobtained outputs of block may have incorrect reference count
Description
blocks automatically release their reference count to anything set as an output
if the output is not obtained by the caller, and the block is run again, the object will persist but the reference will be lost.
Steps to reproduce
- create kblock that can be run multiple times
- run it
- don't grab output, or grab only one of the outputs
- run it again
Possible Solution:
mark outputs when they get obtained, during get_output when block is run, if there are outputs that weren't obtained, release them. reset this count
Edited by Michael Spanier