/** * Delete contents of list. Provides besser memory utilization, * because the system then may reuse the instruction handles. This * method is typically called right after * <href="MethodGen.html#getMethod()">MethodGen.getMethod()</a>. */ public void dispose() { // Traverse in reverse order, because ih.next is overwritten for(InstructionHandle ih=end; ih != null; ih = ih.prev) /* Causes BranchInstructions to release target and targeters, because it * calls dispose() on the contained instruction. */ ih.dispose(); clear(); }
/** * Delete contents of list. Provides better memory utilization, because the system then may reuse the instruction handles. This method is typically called * right after {@link MethodGen#getMethod()}. */ public void dispose() { // Traverse in reverse order, because ih.next is overwritten for (InstructionHandle ih = end; ih != null; ih = ih.getPrev()) { /* * Causes BranchInstructions to release target and targeters, because it calls dispose() on the contained instruction. */ ih.dispose(); } clear(); }
ih.next = ih.prev = null; } else ih.dispose();
ih.setNext(ih.setPrev(null)); } else { ih.dispose();