[DiscordArchive] so when it calls SetMap on teleport, the old map (old m_currMap) is already deleted?
[DiscordArchive] so when it calls SetMap on teleport, the old map (old m_currMap) is already deleted?
Archived author: Tea • Posted: 2024-07-14T13:51:32.333000+00:00
Original source
`E` is freed and nothing prevents the os from reusing its memory for something else
Archived author: Foe • Posted: 2024-07-14T13:52:55.836000+00:00
Original source
But wouldn't it then crash on E being a nullptr? It seems like E still exists, but the eventMgr does not, so it's almost like we're hitting a race condition where parts of the state is closed but others aren't
Archived author: Tea • Posted: 2024-07-14T13:53:18.339000+00:00
Original source
no, ofc no
Archived author: Foe • Posted: 2024-07-14T13:53:19.549000+00:00
Original source
It's weird that E isn't nullptr, but eventMgr is
Archived author: Tea • Posted: 2024-07-14T13:53:47.971000+00:00
Original source
freeing memory doesnt set all the pointers pointing to it to nullptr
Archived author: Foe • Posted: 2024-07-14T13:54:00.833000+00:00
Original source
Oh I see, I understand
Archived author: Tea • Posted: 2024-07-14T13:54:01.614000+00:00
Original source
eventMgr is only nullptr because you do that in ~Eluna()
Archived author: Foe • Posted: 2024-07-14T13:54:10.203000+00:00
Original source
Yeah, I get you
Archived author: Foe • Posted: 2024-07-14T13:59:16.680000+00:00
Original source
Cleanest fix would probably be to clear elunaEvents earlier in the chain
Archived author: Foe • Posted: 2024-07-14T13:59:27.596000+00:00
Original source
ie. prior to their map being changed