Skip to content

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

  1. create kblock that can be run multiple times
  2. run it
  3. don't grab output, or grab only one of the outputs
  4. 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