I have application which uses StackView and pushes a lot of dynamic created objects into this StackView and I need some way to destroy this objecst when they are popped from StackView. If I use Controls 1 Stackview, I can just push object with destroyOnPop property (like it was shown in this question):
tablesStack.push({item: view, destroyOnPop: true})
but it doesn't applicable to Controls 2 StackView. What is correct solution of this problem?
I know only one way: call object.destroy() with delay when I pop it, but this way looks like kludge. If it is important, I can add any code to dynamic generated objects