public void cleanup(Ruby runtime, boolean raise) { if (finalizer != null) { finalizer.finalize(runtime, raise); } else { finalize(runtime, raise); } }
public void cleanup(Ruby runtime, boolean raise) { if (finalizer != null) { finalizer.finalize(runtime, raise); } else { finalize(runtime, raise); } }
public void finalize() { if (fd != null && isAutoclose()) finalize(runtime.getCurrentContext(), true); }
public void finalize() { if (fd != null && isAutoclose()) finalize(runtime.getCurrentContext(), true); }
protected void MakeOpenFile() { if (openFile != null) { Ruby runtime = getRuntime(); ioClose(runtime); openFile.finalize(runtime, false); openFile = null; } openFile = new OpenFile(); }
protected void MakeOpenFile() { if (openFile != null) { Ruby runtime = getRuntime(); ioClose(runtime); openFile.finalize(runtime, false); openFile = null; } openFile = new OpenFile(); }
public void cleanup(Ruby runtime, boolean noraise) { boolean locked = lock(); try { if (finalizer != null) { finalizer.finalize(runtime, this, noraise); } else { finalize(runtime.getCurrentContext(), noraise); } } finally { if (locked) unlock(); } }
@Override public void finalize(Ruby runtime, OpenFile fptr, boolean noraise) { if (!Platform.IS_WINDOWS) { // #if !defined(HAVE_FORK) && !defined(_WIN32) int status = 0; if (fptr.stdio_file != null) { // unsure how to do this // status = pclose(fptr->stdio_file); fptr.posix.close(fptr.stdio_file); } fptr.setFD(null); fptr.stdio_file = null; // no status from above, so can't really do this // runtime.getCurrentContext().setLastExitStatus(); } else { fptr.finalize(runtime.getCurrentContext(), noraise); } // pipe_del_fptr(fptr); } };
@Override public void finalize(Ruby runtime, OpenFile fptr, boolean noraise) { if (!Platform.IS_WINDOWS) { // #if !defined(HAVE_FORK) && !defined(_WIN32) int status = 0; if (fptr.stdio_file != null) { // unsure how to do this // status = pclose(fptr->stdio_file); fptr.posix.close(fptr.stdio_file); } fptr.setFD(null); fptr.stdio_file = null; // no status from above, so can't really do this // runtime.getCurrentContext().setLastExitStatus(); } else { fptr.finalize(runtime.getCurrentContext(), noraise); } // pipe_del_fptr(fptr); } };
public void cleanup(Ruby runtime, boolean noraise) { boolean locked = lock(); try { if (finalizer != null) { finalizer.finalize(runtime, this, noraise); } else { finalize(runtime.getCurrentContext(), noraise); } } finally { if (locked) unlock(); } }