Skip to content

Instantly share code, notes, and snippets.

Siddarth Chandrasekaran siddarth

Block or report user

Report or block siddarth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kimchy
kimchy / gist:1078717
Created Jul 12, 2011
native memory leak with GarbageCollectorMXBean#getLastGcInfo
View gist:1078717
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.util.List;
public class TestMemoryLeak {
public static void main(String[] args) throws Exception {
while (true) {
List<GarbageCollectorMXBean> gcMxBeans = ManagementFactory.getGarbageCollectorMXBeans();
for (GarbageCollectorMXBean gcMxBean : gcMxBeans) {
You can’t perform that action at this time.