Each time a request received by Sylk, get application method called by the __init__.py under sylk/applcation folder, and it instantiates application instance time<div><br></div><div><div> def get_application(self, ruri, headers):</div>
<div> if SYLK_APP_HEADER in headers:</div><div> application = headers[SYLK_APP_HEADER].body.strip()</div><div> else:</div><div> application = ServerConfig.default_application</div><div>
if self.application_map:</div><div> prefixes = ("%s@%s" % (ruri.user, ruri.host), ruri.host, ruri.user)</div><div> for prefix in prefixes:</div><div> if prefix in self.application_map:</div>
<div> application = self.application_map[prefix]</div><div> break</div><div> try:</div><div> app = (app for app in ApplicationRegistry() if app.__appname__ == application).next()</div>
<div> except StopIteration:</div><div> log.error('Application %s is not loaded' % application)</div><div> raise ApplicationNotLoadedError</div><div> else:</div><div> return app() # This is the line I'm trying to mention.</div>
<div><br></div><div>recordroute</div><br><div class="gmail_quote">On Wed, Feb 13, 2013 at 10:59 PM, Saúl Ibarra Corretgé <span dir="ltr"><<a href="mailto:saul@ag-projects.com" target="_blank">saul@ag-projects.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On Feb 13, 2013, at 9:09 PM, Record Route wrote:<br>
<br>
> I mean if it is not singletion, this could cause memory leak?<br>
> recordroute,<br>
> On Wed, Feb 13, 2013 at 9:48 PM, Record Route <<a href="mailto:recordroute@gmail.com">recordroute@gmail.com</a>> wrote:<br>
> Hi,<br>
> I just read the conversation<br>
> Does ConferenceApplication class singleton? This could cause memory leak?<br>
><br>
<br>
</div></div>I'm not exactly sure what you mean by that. Any object that contains another one can be involved in a leak if there are uncollectable cycles, or objects are just retained forever, etc.<br>
<br>
--<br>
Saúl Ibarra Corretgé<br>
AG Projects<br>
<br>
<br>
<br>
</blockquote></div><br></div>