The following code properly calls the baseObjectCreate event, however, when destroying it, using alt::ICore:DestroyBaseObject won't trigger the baseObjectRemove and therefore creates a memory leak in v2 module because it relays on the OnCreateBaseObject / OnRemoveBaseObject methods to cleanup class objects
baseObjectRemove event should always be called for BaseObject entities
Additional context
No response
Operating system
Windows 11
Version
16.0.0-dev.300
Crashdump ID
No response
Confirmation of issue's presence
[X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.
Description of the problem
The following code properly calls the
baseObjectCreate
event, however, when destroying it, usingalt::ICore:DestroyBaseObject
won't trigger thebaseObjectRemove
and therefore creates a memory leak in v2 module because it relays on theOnCreateBaseObject
/OnRemoveBaseObject
methods to cleanup class objectsReproduction steps
Expected behaviour
baseObjectRemove
event should always be called for BaseObject entitiesAdditional context
No response
Operating system
Windows 11
Version
16.0.0-dev.300
Crashdump ID
No response
Confirmation of issue's presence