Guest User

Untitled

a guest
May 27th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. class BugTest
  2. def run
  3. puts "Hey"
  4. end
  5. end
  6.  
  7. # Wait so I can attach VisualVM to inspect
  8. puts "Press enter to begin"
  9. gets
  10.  
  11. i = 1
  12.  
  13. while true
  14. e = Java::RealData.new
  15.  
  16. # Every instance of BugTest creates a new class in a ClassLoader that doesn't get garbage collected
  17. e.setErrors(BugTest.new)
  18.  
  19. # Nice little instance counter for some feedback
  20. if (i % 1000) == 0
  21. puts i
  22. end
  23. i += 1
  24. end
Add Comment
Please, Sign In to add comment