Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1011911 // newDangerousWeakHashMap - make a synchronized WeakHashMap that is cleared regularly to avoid GC problems (see getOpt_cached)

JavaX fragment (include)

1  
static <A, B> Map<A, B> newDangerousWeakHashMap() {
2  
  ret _registerDangerousWeakMap(synchroMap(new WeakHashMap));
3  
}
4  
5  
// initFunction: voidfunc(Map) - is called initially, and after clearing the map
6  
static <A, B> Map<A, B> newDangerousWeakHashMap(O initFunction) {
7  
  ret _registerDangerousWeakMap(synchroMap(new WeakHashMap), initFunction);
8  
}

Author comment

Began life as a copy of #1010621

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011911
Snippet name: newDangerousWeakHashMap - make a synchronized WeakHashMap that is cleared regularly to avoid GC problems (see getOpt_cached)
Eternal ID of this version: #1011911/4
Text MD5: 269251dacfbff6d587bc7376b673f747
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-17 12:47:19
Source code size: 348 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 390 / 461
Version history: 3 change(s)
Referenced in: [show references]