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

21
LINES

< > BotCompany Repo | #1010612 // Test objectID - give each object a VM-unique long ID [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (1373L/9K).

1  
!7
2  
3  
p {
4  
  go();
5  
  
6  
  // Call myself as a module
7  
  call(hotwire(programID()), 'go);
8  
}
9  
10  
svoid go {
11  
  twice {
12  
    long id1 = objectID(mc());
13  
    long id2 = objectID(5);
14  
    long id3 = objectID(1000000000L);
15  
    print("ids: " + id1 + ", " + id2 + ", " + id3);
16  
    print();
17  
    print("Live IDs: " + objectID_liveIDs());
18  
    gc();
19  
    print("Live IDs after GC: " + objectID_liveIDs());
20  
  }
21  
}

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: #1010612
Snippet name: Test objectID - give each object a VM-unique long ID [OK]
Eternal ID of this version: #1010612/8
Text MD5: 817472fcecd1eb0fdbec8f503c62b68e
Transpilation MD5: c28e25573b2ee619dbd5643e6388bdeb
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-23 08:50:52
Source code size: 405 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 523 / 1291
Version history: 7 change(s)
Referenced in: [show references]