I am working on project that uses this pattern
var businessEntity = new DAL().GetObject(id);
// do something with the business entity.
Has anyone followed this pattern?
Does this cause any memory management issues? Any complications with the garbage collector?
Thanks
It works just fine. It will be garbaged collected just fine. Depending on the implementation and the object, either at the end of the line it will be marked for collection, or once businessEntity
goes out of scope.