CSLA - Memory leak?

CSLA - Memory leak?

Old forum URL: forums.lhotka.net/forums/t/1023.aspx


mheere posted on Friday, August 25, 2006

Hi

I have implemented the basic principles of the CSLA framework and all worked well.  However, lately I have become aware that each time I ask a BO to retrieve me some data from the server it increases the memory a bit. This is obviously normal since it has now collected the data.

However, when the BO moves itself through to the client I would have expected this memory to be released but it isn't!  Each subsequent new BO request increases the memory consumption until I eventually run out of it.

Any ideas from anyone?

Thanks

Marcel

ajj3085 replied on Friday, August 25, 2006

Are you actually getting out of memory exceptions?

I've never encountered this before, so I'm not sure it'd be a Csla issue.  When you retreive your data, are you disposing of connection, command and datareader objects properly?  What about any other objects you use?

If you're not getting a memory exception, I wouldn't worry about it... .net has garbage collection, and it will get around to releasing memory eventually.  From everything I've read, this is pretty normal behavior.  Typically the GC only runs when you actually run out of memory.. but if you're getting an exception, its likely because you're not disposing of IDisposable objects properly.

Andy

Copyright (c) Marimer LLC