Uses 1113K of libraries. Click here for Pure Java version (2734L/14K).
1 | !7 |
2 | |
3 | set flag WeakRefVMBusListener_debug. |
4 | |
5 | cprint2 TestWeakRefVMBusListener { |
6 | start-thread { |
7 | S msg = "yoyoyo"; |
8 | |
9 | repeat 3 { |
10 | vmBus_onMessage_weakRef(msg, arg -> enter { |
11 | print("Got arg: " + arg); |
12 | }); |
13 | } |
14 | |
15 | int i = 0; |
16 | repeat 10 { |
17 | vmBus_send(msg, print(++i)); |
18 | sleepSeconds(1); |
19 | } |
20 | |
21 | print("GC"); |
22 | gc(); |
23 | |
24 | repeat 10 { |
25 | vmBus_send(msg, print(++i)); |
26 | sleepSeconds(1); |
27 | } |
28 | } |
29 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031571 |
Snippet name: | Test WeakRefVMBusListener (OK, removes them on or before GC) |
Eternal ID of this version: | #1031571/3 |
Text MD5: | ca56da919f7b1c1d1c3ef70b086dc8fa |
Transpilation MD5: | 0e0cf0b3b78da35bc8f59ec936a264a8 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-22 04:00:18 |
Source code size: | 486 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 182 / 274 |
Version history: | 2 change(s) |
Referenced in: | [show references] |