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

11
LINES

< > BotCompany Repo | #1014825 // holdInstance - hold instance of a class for called functions - use with temp

JavaX fragment (include)

1  
static new ThreadLocal<L<O>> holdInstance_l;
2  
3  
static AutoCloseable holdInstance(O o) {
4  
  if (o == null) null;
5  
  listThreadLocalAdd(holdInstance_l, o);
6  
  ret new AutoCloseable {
7  
    public void close() {
8  
      listThreadLocalPopLast(holdInstance_l);
9  
    }
10  
  };
11  
}

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: #1014825
Snippet name: holdInstance - hold instance of a class for called functions - use with temp
Eternal ID of this version: #1014825/4
Text MD5: 5afb72ee2f70365b2f296c80accf3534
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-07 21:29:35
Source code size: 271 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 402 / 472
Version history: 3 change(s)
Referenced in: [show references]