Package org.mozilla.jss.util
Class StaticVoidPointer
- java.lang.Object
-
- org.mozilla.jss.util.NativeProxy
-
- org.mozilla.jss.util.StaticVoidPointer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class StaticVoidPointer extends NativeProxy
StaticVoidPointer is a Java class that mirror a statically allocated `void *` pointer in C. This is helpful for implementing NativeEnclosure and preventing the resulting pointer from getting tracked in the usual NativeProxy allocation trackers and avoiding a double free.
-
-
Field Summary
-
Fields inherited from class org.mozilla.jss.util.NativeProxy
logger
-
-
Constructor Summary
Constructors Constructor Description StaticVoidPointer(byte[] pointer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
releaseNativeResources()
Release the native resources used by this proxy.-
Methods inherited from class org.mozilla.jss.util.NativeProxy
assertRegistryEmpty, clear, close, equals, finalize, hashCode, isNull, purgeAllInRegistry, toString
-
-
-
-
Method Detail
-
releaseNativeResources
protected void releaseNativeResources()
Description copied from class:NativeProxy
Release the native resources used by this proxy. Subclasses of NativeProxy must define this method to clean up data structures in C code that are referenced by this proxy. releaseNativeResources() will usually be implemented as a native method.You don't call this method; NativeProxy.finalize() or close() calls it for you.
If you free these resources explicitly, call clear(); instead.- Specified by:
releaseNativeResources
in classNativeProxy
-
-