/// <param name="pooledMemory">if set to <c>true</c> then the TColor[] is from the PixelPool{TColor} thus should be returned once disposed.</param>
/// <param name="pooledMemory">if set to <c>true</c> then the <see cref="T:TColor[]"/> is from the <see cref="PixelPool{TColor}"/> thus should be returned once disposed.</param>
/// Gets a value indicating whether [pooled memory].
/// Gets a value indicating whether the current pixel buffer is from a pooled source.
/// </summary>
/// <value>
/// <c>true</c> if [pooled memory]; otherwise, <c>false</c>.
/// </value>
publicboolPooledMemory{get;privateset;}
/// <summary>
@ -259,8 +256,8 @@ namespace ImageSharp
if(this.PooledMemory)
{
PixelPool<TColor>.ReturnPixels(this.pixels);
this.pixels=null;
PixelPool<TColor>.ReturnPixels(this.pixelBuffer);
this.pixelBuffer=null;
}
}
@ -273,17 +270,17 @@ namespace ImageSharp
}
/// <summary>
/// Sets the pixel buffer in an unsafe manor this should not be used unless you know what its doing!!!
/// Sets the pixel buffer in an unsafe manner. This should not be used unless you know what its doing!!!
/// </summary>
/// <param name="width">The width.</param>
/// <param name="height">The height.</param>
/// <param name="pixels">The pixels.</param>
/// <param name="pooledMemory">if set to <c>true</c> [pooled memory].</param>
/// <param name="pooledMemory">If set to <c>true</c> this indicates that the pixel buffer is from a pooled source.</param>
/// <returns>Returns the old pixel data thats has gust been replaced.</returns>
/// <remarks>If PixelAccessor.PooledMemory is true then caller is responsible for ensuring PixelPool.ReturnPixels() is called.</remarks>
/// <remarks>If <see cref="M:PixelAccessor.PooledMemory"/> is true then caller is responsible for ensuring <see cref="M:PixelPool.ReturnPixels()"/> is called.</remarks>