private MyBO _boname = null;private MyBO boname{ get { if (_boname == null) _boname = new MyBO(); return _boanme; }}
My question is I remember reading some where in the documentation that when a BO is created thru code that the Dispose() method should be called. Where would I be putting that call? Should I even be doing something like this? I have done this on some BO's that require using other BO's to complete a process, that way the helper BO's don't need to be created unless they are needed.
protected override Dispose(bool disposing){ //-- Make the base call base.Dispose(disposing); //-- Make sure we're disposing if (disposing) { //-- Make sure we have a reference to the bo and dispose of it if (this._boname != null) { this._boname.Dispose(); } }}