<html><head><base href="x-msg://505/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">I am trying to use a subclass of RTSPClient and it has a static variable for the scheduler and environment</div></div></div></span></blockquote><div><br></div>You don't need to do this.  Each subclass of "Medium" (which includes "RTSPClient") has a member function</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>envir()</div><div>which returns its "UsageEnvironment".  And "UsageEnvironment" has a member function</div><div><span class="Apple-tab-span" style="white-space:pre">   taskScheduler()</span></div><div>which returns its "TaskScheduler".</div><div><br></div><div>So you shouldn't need to add any fields for these.</div><div><br></div><div>Note that - each time you create a "TaskScheduler"/"UsageEnvironment" pair - you first create the "TaskScheduler"; then you create a "UsageEnvironment" that uses it.  (Note the numerous examples in "testProgs".)</div><div><br></div><div>Therefore, when deleting these objects, you should do so in reverse order:</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>- First call "reclaim()" on the "UsageEnvironment" object</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Then "delete" the "TaskScheduler" object.</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>(Yes, this is rather ugly and inconsistent...)</div><div><br></div><div>    Ross.</div><div><br></div></body></html>