MCPcopy Create free account
hub / github.com/Kitware/VTK / gc

Method gc

Wrapping/Java/vtk/vtkJavaMemoryManagerImpl.java:110–130  ·  view source on GitHub ↗
(boolean debug)

Source from the content-addressed store, hash-verified

108
109 // Thread safe
110 public vtkReferenceInformation gc(boolean debug) {
111 System.gc();
112 try {
113 this.lock.lock();
114 final vtkReferenceInformation infos = new vtkReferenceInformation(debug);
115 for (Long id : new TreeSet<Long>(this.objectMap.keySet())) {
116 vtkObjectBase obj = this.objectMap.get(id).get();
117 if (obj == null) {
118 infos.addFreeObject(this.objectMapClassName.get(id));
119 this.unRegisterJavaObject(id);
120 } else {
121 infos.addKeptObject(this.objectMapClassName.get(id));
122 }
123 }
124
125 this.lastGcResult = infos;
126 return infos;
127 } finally {
128 this.lock.unlock();
129 }
130 }
131
132 public vtkJavaGarbageCollector getAutoGarbageCollector() {
133 return this.garbageCollector;

Callers

nothing calls this directly

Calls 7

addFreeObjectMethod · 0.95
unRegisterJavaObjectMethod · 0.95
addKeptObjectMethod · 0.95
gcMethod · 0.65
lockMethod · 0.45
getMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected