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

13
LINES

< > BotCompany Repo | #1008239 // Check size of CachedPainter (apparently a typical memory leak with HTML-styled JLabel)

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

Libraryless. Click here for Pure Java version (419L/3K/12K).

!7

p {
  Class cp = getClass("sun.swing.CachedPainter");
  Map cacheMap = cast get(cp, "cacheMap");
  print("cacheMap size: " + l(cacheMap));
  for (O key : keys(cacheMap)) {
    O imageCache = cacheMap.get(key);
    int maxCount = cast get(imageCache, "maxCount");
    L entries = cast get(imageCache, "entries");
    print("  Key: " + key + ", entries: " + l(entries) + ", maxCount: " + maxCount);
  }
}

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: #1008239
Snippet name: Check size of CachedPainter (apparently a typical memory leak with HTML-styled JLabel)
Eternal ID of this version: #1008239/4
Text MD5: 4edff820cd927b8ef387aa007d3bb79c
Transpilation MD5: fe9f461196fc35a5f2e4fc74fce9fefd
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-02 04:30:05
Source code size: 418 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 480 / 536
Version history: 3 change(s)
Referenced in: [show references]