BepuPhysics/BodyLayoutOptimizer.cs
/// <summary>
/// Returns the multithreaded claims array to the provided pool.
/// </summary>
/// <remarks><para>Apart from its use in the optimization function itself, this only needs to be called when the simulation is being torn down 
/// and outstanding pinned resources need to be reclaimed (with the assumption that the underlying bufferpool will be reused).</para>
/// <para>Note that it's possible to reuse the body layout optimizer after disposal. The update function will reallocate a claims array as needed.</para></remarks>
/// <param name="pool">Pool to return the claims array to.</param>
Returns the multithreaded claims array to the provided pool.
Returns the multithreaded claims array to the provided pool .
public void Dispose(BufferPool pool)
        {
            if (claims.Length > 0)
            {
                pool.SpecializeFor<int>().Return(ref claims);
            }
        }
public void Dispose ( BufferPool pool ) { if ( claims . Length > 0 ) { pool . SpecializeFor < int > ( ) . Return ( ref claims ) ; } }
Returns the multithreaded claims array to the provided pool.
Returns the multithreaded claims array to the provided pool .
pool
BufferPool
Pool to return the claims array to.
Pool to return the claims array to .
remarks
Apart from its use in the optimization function itself, this only needs to be called when the simulation is being torn down
and outstanding pinned resources need to be reclaimed (with the assumption that the underlying bufferpool will be reused).Note that it's possible to reuse the body layout optimizer after disposal. The update function will reallocate a claims array as needed.
Apart from its use in the optimization function itself this only needs to be called when the simulation is being torn down and outstanding pinned resources need to be reclaimed ( with the assumption that the underlying bufferpool will be reused ) . Note that it ' s possible to reuse the body layout optimizer after disposal . The update function will reallocate a claims array as needed .