Using same object in many methods
Suppose i create an object and use it in say 3-4 methods.. If all the methods are called how does this work?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ravi ShekharRank #673 · 3.6K reputationPosted May 4, 2013, 1:02 AM EDT
After any use of every object must dispose.
Like globally you make an object of a class...
Class objClass;
in the first method....
objClass=new Class();
here do work with objClass
Now call objClass.Dispose();
as same as in second method again....
objClass=new Class();
here do work with objClass
Now call objClass.Dispose();
1
this is the best way to use.
regards,
ravi.
Please mark it as answer if it helped you.