Page MenuHomeFeedback Tracker

Add "deinit"/"destroy" event handler
Acknowledged, WishlistPublic

Description

On the Arma 3 event handlers page, there's an "init" event handler.

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Init

However, there is no "deinit"/"destroy" event handler. Thus, there is no consistent way to "cleanup" objects that are removed. Objects can be removed from a variety of ways (deleteVehicle, destroy, etc.). There is a "killed" event handler but no event handler that encompasses ALL ways the object can be removed.

There are ways to get around this such as checking to see if the object still exists (isNull), however, this is inefficient and requires extra looping through (potentially) large numbers of objects. A more efficient solution would be to provide the appropriate opposite event handler for "init".

Details

Legacy ID
1289526059
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Feature Request

Event Timeline

firefly2442 edited Additional Information. (Show Details)
firefly2442 set Category to Feature Request.
firefly2442 set Reproducibility to N/A.
firefly2442 set Severity to None.
firefly2442 set Resolution to Open.
firefly2442 set Legacy ID to 1289526059.May 7 2016, 7:57 PM

Are you saying you need "deinit" event handler to know when object is deleted so you can delete it? I'm not sure I understand the purpose of such EH.

Yes, basically there's an "init" event handler, but there's no opposite event handler to handle deletion.