GSF.Core: Removed references to the ReusableObjectPool and marked ReusableObjectPool as obsolete.
Showing the changes to Source/Libraries/GSF.Core/Parsing/MultiSourceFrameImageParserBase.cs (1 of 10 files). Show all
Unified · Split
| @@ -328,7 +328,7 @@ namespace GSF.Parsing · 327 unmodified lines | |||
| 328 | if (count > 0) | 328 | if (count > 0) |
| 329 | { | 329 | { |
| 330 | // Get an identifiable buffer object | 330 | // Get an identifiable buffer object |
| 331 | identifiableBuffer = ReusableObjectPool<SourceIdentifiableBuffer>.Default.TakeObject(); | 331 | identifiableBuffer = FastObjectFactory<SourceIdentifiableBuffer>.CreateObjectFunction(); |
| 332 | identifiableBuffer.Source = source; | 332 | identifiableBuffer.Source = source; |
| 333 | identifiableBuffer.Count = count; | 333 | identifiableBuffer.Count = count; |
| 334 | 334 | ||
| @@ -343,7 +343,7 @@ namespace GSF.Parsing · 8 unmodified lines | |||
| 343 | } | 343 | } |
| 344 | catch | 344 | catch |
| 345 | { | 345 | { |
| 346 | // Return source buffer to object pool if we failed to queue it for processing | 346 | // Properly dispose of the source buffer if we failed to queue it for processing |
| 347 | if ((object)identifiableBuffer != null) | 347 | if ((object)identifiableBuffer != null) |
| 348 | identifiableBuffer.Dispose(); | 348 | identifiableBuffer.Dispose(); |
| 349 | 349 | ||
| @@ -430,7 +430,7 @@ namespace GSF.Parsing · 80 unmodified lines | |||
| 430 | } | 430 | } |
| 431 | finally | 431 | finally |
| 432 | { | 432 | { |
| 433 | // Dispose of source buffers - this returns buffers to pool | 433 | // Dispose of source buffers |
| 434 | if ((object)buffers != null) | 434 | if ((object)buffers != null) |
| 435 | { | 435 | { |
| 436 | foreach (SourceIdentifiableBuffer buffer in buffers) | 436 | foreach (SourceIdentifiableBuffer buffer in buffers) |