﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » How to dispose BO stored at field?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:57:38 GMT</lastBuildDate><ttl>20</ttl><item><title>How to dispose BO stored at field?</title><link>http://forum.strataframe.net/FindPost22969.aspx</link><description>Hi,&lt;br&gt;
I have initialized a BO to MasterPage's private field. &lt;br&gt;
&lt;br&gt;
[codesnippet]private MyBO _myBO = new MyBO();[/codesnippet]&lt;br&gt;
&lt;br&gt;
How could I dispose it? I tried to override MasterPage.Dispose() and call BO.Dispose(). However, it is not been released. I check using ANT profiler, it still show the BO is still at memory.&lt;br&gt;
&lt;br&gt;
Any ideas?&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Thu, 30 Apr 2009 08:41:16 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: How to dispose BO stored at field?</title><link>http://forum.strataframe.net/FindPost22971.aspx</link><description>Did you actually trace to see that the BO gets disposed in the masterpage dispoal?&amp;nbsp; That would be the first thing that I would do.&amp;nbsp; The only other reason that it would not dispose is there is another class that has a reference to the object...or an event handler.&amp;nbsp; If you are adding a handler to the BO and not removing the handler then you can have an object stick around as well.</description><pubDate>Thu, 30 Apr 2009 08:41:16 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>