| 1 | package org.jpype.ref; |
| 2 | |
| 3 | import java.lang.reflect.Method; |
| 4 | |
| 5 | /** |
| 6 | * |
| 7 | * @author nelson85 |
| 8 | */ |
| 9 | public class JPypeReferenceNative |
| 10 | { |
| 11 | |
| 12 | /** |
| 13 | * Native hook to delete a native resource. |
| 14 | * |
| 15 | * @param host is the address of memory in C. |
| 16 | * @param cleanup is the address the function to cleanup the memory. |
| 17 | */ |
| 18 | public static native void removeHostReference(long host, long cleanup); |
| 19 | |
| 20 | /** |
| 21 | * Triggered by the sentinel when a GC starts. |
| 22 | */ |
| 23 | public static native void wake(); |
| 24 | |
| 25 | /** |
| 26 | * Initialize resources. |
| 27 | * |
| 28 | * @param self |
| 29 | * @param m |
| 30 | */ |
| 31 | public static native void init(Object self, Method m); |
| 32 | |
| 33 | } |