}
/** Destroy the C communication object, when the GC reclaims the java part. */
- @Override
- protected void finalize() {
- try {
- nativeFinalize();
- } catch (Throwable e) {
- e.printStackTrace();
- }
+ protected void finalize() throws Throwable{
+ nativeFinalize();
}
protected native void nativeFinalize();
/**
public Mutex() {
init();
}
- @Override
- protected void finalize() {
- try {
- nativeFinalize();
- } catch (Throwable e) {
- e.printStackTrace();
- }
+
+ protected void finalize() throws Throwable{
+ nativeFinalize();
}
private native void nativeFinalize();
private native void init();
* The natively implemented method to create a C RngStream object.
*/
private native void create(String name);
- @Override
- protected void finalize() {
- try {
- nativeFinalize();
- } catch (Throwable e) {
- e.printStackTrace();
- }
+
+ protected void finalize() throws Throwable{
+ nativeFinalize();
}
/**
* Release the C RngStream object
/** Deletes this semaphore when the GC reclaims it */
- @Override
- protected void finalize() {
- try {
- nativeFinalize();
- } catch (Throwable e) {
- e.printStackTrace();
- }
+ protected void finalize() throws Throwable {
+ nativeFinalize();
}
private native void nativeFinalize();
/**
public native void cancel();
/** Deletes a task once the garbage collector reclaims it */
- @Override
- protected void finalize() {
- try {
- // Exceptions in finalizers lead to bad situations:
- // http://stackoverflow.com/questions/7644556/troubleshooting-a-java-memory-leak-finalization
- nativeFinalize();
- bind=0; // to avoid segfaults if the impossible happens yet again making this task surviving its finalize()
- } catch (Throwable e) {
- e.printStackTrace();
- }
+ protected void finalize() throws Throwable{
+ nativeFinalize();
+ bind=0; // to avoid segfaults if the impossible happens yet again making this task surviving its finalize()
}
protected native void nativeFinalize();
/* * * *