How to dispose the objects created by factory pattern

Posted by Ram on Stack Overflow See other posts from Stack Overflow or by Ram
Published on 2010-04-19T09:05:16Z Indexed on 2010/04/19 9:13 UTC
Read the original article Hit count: 144

Filed under:
|

Hi,

I am using Factory pattern to create .NET objects of a class. I also need to make sure that all such objects should be disposed before application terminates.

Where and How can I dispose the objects created by factory pattern? Shall I dispose in the class in which I am getting the objects created by factory?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about design-patterns