﻿<?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?)  » Removed unused BO from session</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 03:47:11 GMT</lastBuildDate><ttl>20</ttl><item><title>Removed unused BO from session</title><link>http://forum.strataframe.net/FindPost28553.aspx</link><description>Hi,&lt;div&gt;As SF's web page create and store BO instance at session. Anyway to remove unused BO instance without need to wait till session timeout?&lt;br/&gt;&lt;br/&gt;&lt;div&gt;For example, when navigate to Form A, it uses BOA, BOB and BOC,&lt;div&gt;when navigate to FormB, it uses BOX, BOY and BOZ.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;My question is, since&amp;nbsp;BOA, BOB and BOC no longer needed, how to clear them?&lt;div&gt;I was thinking to override SF Base Page and add prefix to BO session name. Before InitializeBusinessObject and NOT postback, remove all BOs from session which its session name with prefix as desired. However, it might not works as end user might open more than one page at the same time (FormA and Form in 2 browser tabs).&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Any advice?&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Thank you</description><pubDate>Tue, 19 Oct 2010 01:43:56 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: Removed unused BO from session</title><link>http://forum.strataframe.net/FindPost28740.aspx</link><description>Hi&lt;div&gt;The problem is, I don't know when to release it.. because I am not sure if it is still in used by other page... or just hanging... unless session expired</description><pubDate>Tue, 19 Oct 2010 01:43:56 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: Removed unused BO from session</title><link>http://forum.strataframe.net/FindPost28615.aspx</link><description>Well, you can remove the BOs from the session as they are just stored in the session with the name of the property:&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]public MyBo Business1{.....}[/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;In the above example, the Session variable should be Session["Business1"].&amp;nbsp; However, this can be dangerous as the BasePage will be expecting them and will ultimately take the logic out of the framework and place it in your hands as to make sure that these sessions get restored.</description><pubDate>Thu, 07 Oct 2010 07:36:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>