Page MenuHomeFeedback Tracker

SQF hash map idea - event handler which is called when the hash map is deleted
Closed, ResolvedPublic

Description

Hello,

It would be useful to have some code called when a hash map is deleted so that we can do some custom cleanup.

Simplest implementation could be done by checking if map contains a special key like "__deleted_handler", and if it exists, the game could call this code.

Usage example:

testhash = createHashMap;
testhash set [ "__deleted_handler" , {
   params ["_hm"]; // _this = this hashmap
   // do something with the elements of _hm
}];

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Scripting

Event Timeline

Sparker created this task.May 18 2021, 7:16 PM
dedmen closed this task as Resolved.Sep 26 2023, 2:15 PM
dedmen claimed this task.
dedmen added a subscriber: dedmen.