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)

static <A, B> Map<A, B> newDangerousWeakHashMap() {
  ret _registerDangerousWeakMap(synchroMap(new WeakHashMap));
}

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

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: 460 / 534
Version history: 3 change(s)
Referenced in: [show references]