There is no need to set your object to null. The GC should be able to indicate if the Document isn't being used any further on it's own. This will happen automatically as memory is needed but if you want to clear it immediately call GC.Collect(). See this thread for further discussion.