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)

static new ThreadLocal<L<O>> holdInstance_l;

static AutoCloseable holdInstance(O o) {
  if (o == null) null;
  listThreadLocalAdd(holdInstance_l, o);
  ret new AutoCloseable {
    public void close() {
      listThreadLocalPopLast(holdInstance_l);
    }
  };
}

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