![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi: I declare a dataset obejct as static type in one class, such as: class A{ private static dataset ds; public void process(){ // some code } } I want to know if the ds object can be disposed by handly. what does JIT do when it compile this class ? |
#3
| |||
| |||
|
|
Hi, You can set the ds variable to null, thereby making the object referenced by ds eligible for garbage collection (provided it has no other root references, like another static member pointing to the same object). Otherwise, lifetime of static members is that of the containing appdomain itself, and are collected only when the appdomain is unloaded. JIT compilation is a per method operation. Could you be more specific with your question? -- HTH, Manoj G MVP, Visual Developer http://msmvps.com/manoj "Napo" <Napo (AT) discussions (DOT) microsoft.com> wrote in message news:3A062708-522D-4559-B57B-CB8569247492 (AT) microsoft (DOT) com... Hi: I declare a dataset obejct as static type in one class, such as: class A{ private static dataset ds; public void process(){ // some code } } I want to know if the ds object can be disposed by handly. what does JIT do when it compile this class ? |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |