pixi.js
    Preparing search index...

    Interface ElementImageSourceOptionsExperimental Advanced

    Options for creating an ElementImageSource.

    import { ElementImageSource } from 'pixi.js/html-source';

    // Manual lifetime (default): you call snapshot.close() yourself.
    const source = new ElementImageSource({ resource: snapshot });

    // Let the source close the snapshot for you when it is destroyed.
    const owned = new ElementImageSource({ resource: snapshot, autoClose: true });

    ElementImageSource For the texture source these options configure

    interface ElementImageSourceOptions {
        autoClose?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    autoClose?: boolean

    Call ElementImage.close on the snapshot when this source is destroyed. Leave false when the same snapshot is shared with other sources or reused later, otherwise you risk a use-after-free.

    false
    
    const source = new ElementImageSource({ resource: snapshot, autoClose: true });

    source.destroy(); // snapshot.close() is called for you