rolle Posted July 5, 2014 Share Posted July 5, 2014 I need some teardown code to run when playercontroller is destroyed. I tried adding it in PlayerController:OnRemoveEntity, but this code never seems to be called. If I dont add my teardown code the game crashes without log printouts when going to main menu. I would assume it is related to the controller being GC:ed and I use some win32 threads and other un-friendly code. Is there any general way to handle tear-down code for components? I guess I could do some hacky stuff as listening for a quit and save and then do the teardown, but would like to avoid this. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.