(boolean debug)
| 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; |
nothing calls this directly
no test coverage detected