static Map<O, Bool> autoCleanUp_list = newWeakHashMap(); static <A> A autoCleanUp(A a) { if (a != null) autoCleanUp_list.put(a, true); ret a; } static void cleanMeUp_autoCleanUp() { L l = cloneList(keys(autoCleanUp_list)); autoCleanUp_list.clear(); cleanUp(l); }
Began life as a copy of #1003121
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008864 |
Snippet name: | autoCleanUp - register object for automatic clean-up when program exits |
Eternal ID of this version: | #1008864/5 |
Text MD5: | 5bbb462f005e2506bafa29a2e8bc55ea |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-10 16:15:16 |
Source code size: | 290 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 607 / 664 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |