Module io.scif
Package io.scif.img

Class ImgPlusCtxCleaningProvider.ImgPlusCtxCleaner

  • All Implemented Interfaces:
    CleaningRef
    Enclosing class:
    ImgPlusCtxCleaningProvider

    public static class ImgPlusCtxCleaningProvider.ImgPlusCtxCleaner
    extends PhantomReference<net.imagej.ImgPlus>
    implements CleaningRef
    PhantomReference implementation used to dispose a Context when all ImgPlus references have been garbage collected. Create this reference as new ImgPlus instances are generated with an anonymous Context. This will ensure that when the ImgPlus instances go out of scope, the Context is shut down properly.
    Author:
    Mark Hiner