Search Results for

    Show / Hide Table of Contents

    Class ObjectsRemovalService

    Removing old objects service. Your friendly garbage collector!

    Inheritance
    ObjectsRemovalService
    Assembly: FlaxEngine.dll
    File: Engine/Core/ObjectsRemovalService.h
    Syntax
    public class ObjectsRemovalService

    Methods

    Add(Object* obj, float timeToLive=1.0f, bool useGameTime=false)

    Adds the specified object to the dead pool.

    Declaration
    public static void Add(Object* obj, float timeToLive=1.0f, bool useGameTime=false)
    Parameters
    Object obj

    The object.

    float timeToLive

    The time to live (in seconds).

    bool useGameTime

    True if unscaled game time for the object life timeout, otherwise false to use absolute time.

    Dereference(Object* obj)

    Removes the specified object from the dead pool (clears the reference to it).

    Declaration
    public static void Dereference(Object* obj)
    Parameters
    Object obj

    The object.

    Flush()

    Flushes the objects pool removing objects marked to remove now (with negative or zero time to live).

    Declaration
    public static void Flush()
    Returns
    void

    Flush(float dt, float gameDelta)

    Flushes the objects pool.

    Declaration
    public static void Flush(float dt, float gameDelta)
    Parameters
    float dt

    The delta time (in seconds).

    float gameDelta

    The game update delta time (in seconds).

    ForceFlush()

    Forces the flush the all objects from the pool.

    Declaration
    public static void ForceFlush()
    Returns
    void

    IsInPool(Object* obj)

    Determines whether object has been registered in the pool for the removing.

    Declaration
    public static bool IsInPool(Object* obj)
    Parameters
    Object obj

    The object.

    Returns
    bool

    True if object has been registered in the pool for the removing, otherwise false.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat