Package globus.glmap

Class GLNativeObject

java.lang.Object
globus.glmap.GLNativeObject
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
GLMapAnimation, GLMapDrawObject, GLMapInfo, GLMapLocaleSettings, GLMapMarkerStyleCollection, GLMapRasterTileSource, GLMapRelation, GLMapStorage, GLMapStyleParser, GLMapTrackData, GLMapVectorCascadeStyle, GLMapVectorObject, GLMapVectorObjectList, GLMapVectorStyle, GLMapViewRenderer, GLMapViewState, GLRoute, GLRouteBuilder, GLRouteElevation, GLRouteManeuver, GLRouteRequest, GLRouteTracker, GLSearch, GLSearchCategories, GLSearchCategory, GLSearchFilter, MapPointSet, NetworkTask

public abstract class GLNativeObject extends Object implements AutoCloseable
Base class for objects backed by native resources.

Call close() when the object is no longer needed. Native resources are eventually released by the garbage collector as a fallback, but deterministic cleanup avoids native memory accumulating between collections.

  • Constructor Details

    • GLNativeObject

      public GLNativeObject(long id)
      Default constructor
      Parameters:
      id - native object pointer
  • Method Details

    • dispose

      public void dispose()
      Explicitly releases native resources held by the object. Equivalent to close().
    • close

      public void close()
      Releases native resources. Enables try-with-resources and Kotlin use.
      Specified by:
      close in interface AutoCloseable