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

9
LINES

< > TinyBrain | #1006295 - regularGC - perform GC regularly (once a minute) - now installed automatically by VM

JavaX fragment (include)

static int regularGC_interval = 60000; // every minute
static int regularGC_firstDelay = 20000; // clean up 20 seconds after loading VM
static volatile java.util.Timer regularGC_timer;

static synchronized void regularGC() {
  if (!_inCore()) ret; // Now doing it in core
  if (regularGC_timer == null)
    regularGC_timer = doEvery_daemon(regularGC_interval, regularGC_firstDelay, f timedGC);
}

download  show line numbers  debug dex   

Travelled to 1 computer(s): sawdedvomwva

No comments. add comment

Snippet ID: #1006295
Snippet name: regularGC - perform GC regularly (once a minute) - now installed automatically by VM
Eternal ID of this version: #1006295/6
Text MD5: fa4a63f5c61d52bc87f9ca2bb58c3bb5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-21 00:27:54
Source code size: 403 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 50 / 4
Version history: 5 change(s)
Referenced in: [show]