c# - StructureMap InstanceScope.Hybrid and IDisposable -


I am working on an asp.net-mvc application. The linux data reference is being passed in my service items by the structure map. I have the scope of the hybrid, it all works well.

  Configure Protected Override Z () {ForRequestedType & lt; AetherDataContext & gt; (). Default IS ((=); New AetherDataContext ()) .CacheBy (InstanceScope.Hybrid); }  

The problem is that I am running our memory, I am thinking that the IDICopose-enabled interface is actually being called in fact.

Has anyone got any ideas?

UPDATE:

So, some additional information, I just filled up some things, put break points in ways in terms of my data.

  Protected Override Zero Disks (Bull Displays) {Debug WriteLine ("Disposing:" + DateTime.Now); Base.Dispose (settlement); } Public new zero extraction () {Debug.WriteLine ("Disposing:" + DateTime.Now); Base.Dispose (); }  

I am sure that I am doing this right, I think the new method will be called?

Nevertheless, neither break points became a hit. Although the constructor for the same class was called on every request though. I am thinking that not ideal.

This is an exact copy of the question I asked about 2 days ago:

Instancescope Hebrbrid just stores the object inside HTTPPContext. Present. If it is present or thradoclonal storage, otherwise the instancescope. HTPation works the same way, apart from this, HTTP uses session and threadlocal. The collection of items stays on every request, so if you apply the pattern given on my question then you should show the firing settlement at the end of the current request.


Comments