open-ead / sead

Decompilation of sead: the standard C++ library for first-party Nintendo games
190 stars 26 forks source link

Remove the destructor from TreeMap #115

Closed TheGreatB3 closed 1 year ago

TheGreatB3 commented 1 year ago

This change is Reviewable

leoetlino commented 1 year ago

https://discord.com/channels/688807550715560050/745633101157498880/1047569058293370992

[18:45]TheGreatB3: Here's another issue I've been having. The CookingMgr SingletonDisposer dtor has stopped matching, I think since I added the FixedTreeMap. https://decomp.me/scratch/XTaR3 decomp.me _ZN5uking10CookingMgr18SingletonDisposer_D1Ev Score: 3753 (0%) Owner: TheGreatB3 [21:33]leoetlino: ah, I think the issue is that the TreeMap destructor should not exist [21:35]leoetlino: it's definitely incorrect to assume that the tree map buffer is always dynamically allocated (it isn't when using a FixedTreeMap for instance) and try to free it at destruction time [21:36]leoetlino: I can't even remember why I added the destructor in the first place [21:36]leoetlino: but in retrospect I think it's quite obvious that it shouldn't exist