I have an application that caches several codefluent objects.When I put several of those cached objects in a temporary collection the collection is never released from memory. By profiling the application with ANTS I found the villan: an eventhandler that is attached when the object is inserted in the collection in the 'BaseAdd' function of the collection.
cwProperty.KeyChanged += new System.EventHandler<CodeFluent.Runtime.Utilities.KeyChangedEventArgs<System.Guid>>(this.OnItemKeyChanged);
How can I prevent this eventhandler to be attached or how can I clean this up?