Loader.free

Frees the resource from memory by calling the free construct on the resource if it has unreleased pointers and so on, and later removes the resource from the array, letting the garbage collector destroy this object.

  1. void free(string path)
  2. void free(T obj)
    class Loader
    @safe @trusted
    void
    free
    (
    T
    )
    (
    T obj
    )

Parameters

T

Resource class

obj T

Resource object

Examples

auto myImage = loader.load!Image(...);
loader.free(myImage);

Meta