If objects contain native handles be sure the objects have finalizers to handle that case before this is used. This just clears the entire pool. It does not call dispose or anything else. Clearing will make the objects that are left in the pool, not reachable so they will be garbage collected at a future point. It is possible after this is called that there are items still in use and they will be released back to the pool by the user code when it is done with the object. (So even after clearing you might discover objects back in the pool) This also clears all internal datastructures that were being pooled to store objects in the pool and objects it expects to return to the pool. Also requests to get new objects will allocate them.

Namespace: RCLibrary
Assembly: RCLibrary (in RCLibrary.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void Clear()
Visual Basic
Public Sub Clear
Visual C++
public:
void Clear()

See Also