Log in

Advanced CleanForFree

From MDrivenWiki

When you subclass stuff from MDrivenFramework, you may need to implement a method called CleanForFree.

The CleanForFree is part of a pattern and is called once it has been decided that an object will never be used again (i.e. disposed of).

The CleanForFree is a softer version of Dispose where you release references kept so that the Garbage collection will classify objects as deleted faster than if they are connected to other things. Think of CleanForFree as disassembling large objects structures as you would with normal garbage to make them decompose faster.