PDA

View Full Version : New flag: TF2ITEMS_CLOSE_HANDLE


Powerlord
07-06-2012, 12:22
It'd be nice if there were a flag in TF2Items to automatically close the hItem handle (if it's not NULL). This would be useful for the TF2Items_OnGiveNamedItem callback, as SourcePawn can't close that handle inside the callback because it isn't used until the callback returns.

Side note: This doubles as a bug report, because TF2Items_OnGiveNamedItem will leak handles if this line is present in its handler:
hItem = TF2Items_CreateItem(any flags here);