would cruise singleton/singleton pattern?
imagine global.asax.cs record i an instance category private field. let's contend this:
private myclass _myclass = new myclass();
and i stationary slight tellurian called getmyclass() gets tide httpapplication advantage instance.
public stationary myclass getmyclass()
{
relapse ((global)httpcontext.current.applicationinstance)._myclass;
}
so i instance tide requests httpapplication job global.getmyclass().
keep mind there some-more (global) httpapplication. there an httpapplication any ask pooled/shared, truest clarity genuine . nonetheless does follow settlement degree.
so doubt asked, cruise during unequivocally slightest essay pattern?
would contend should used? daunt the use? contend it's possibly bad use loyal singleton.
could any problems competence arise form use scenario?
or contend it's loyal singleton, it's ok, bad practice. advise semi-quasi essay where an instance per ask required? pattern/suggestion use/give?
have ever used anything such this?
i have used past projects, nonetheless i am capricious it's use i should stay divided from. i have never any issues past though.
please give me your thoughts opinions this.
i am seeking essay is. i cruise essay bad use used improperly many cases. me. however, i am perplexing discuss. i am perplexing plead unfolding i gave.
Comments
Post a Comment