I’m using Objects to run certain functions. As I understand it, Objects can be used to run functions and events, and will get garbage collected when nothing is referencing it. So keeping its reference alive for as long as I need it, and then removing the reference to delete it.
I have made a Parent Object that implements the Interface and can have some events and variables avaliable to all children, I store all the children under it’s parent reference. That way I can store all Objects in an array and trigger the shutdown interface / event from the reference in the array.
When constructing the object, I call the Initialize function, this works fine and prints.
And before removing the reference, I call the Shutdown event from the stored reference.
However, the Shutdown event is never triggered on the children Objects.
If I print from the parent, it will print. But the children never prints.
Any idea why this might be happening? What am I missing here?
Thanks, i found the issue. The reference was indeed referecing the wrong object, an error in a different location of the code that changes the reference. I forgot about it, and thus expected that Blueprint’s functions to be triggered, when it was triggered another blueprint’s functions lol…