1. why apply using to SGeneric? does it contain any system resources like file handle,connection...etc? if not, u may take it off as "using" is converted into try/finally block which is expensive. it seems to me when u done ur logic in new created window,u may explicitly set generic=null to allow next round garbage collector reclaim this block of memory. or just leave it, once it's out of its scope, nothing references it. it becomes orphan and garbage collector will work on it anyway.
2. next round garbage collection may not be happen immediately until memory reaches its threshold. it's not recommended that u explicitly call gc.collect(). in that sense, it might be called "memory leak", but it's quite normal to me.(that's why i don't like .net for this part)
3.how do u check ur memory red gate ants memory profiler? that's good one,mime got expired at work last week, i'll do some experiment tonight at home. if i find something interesting, i'll let u know.
it's very good topic, thx for sharing with us.
just wild guess......
所有跟帖:
•
咦~~, .net怎么看着象VBA呢?
-小谋-
♀
(0 bytes)
()
10/21/2009 postreply
19:30:09
•
some .net role need to do VBA. i'm not familiar with it.
-撅着挺好-
♂
(0 bytes)
()
10/21/2009 postreply
19:58:49
•
回复:just wild guess......
-相逢是缘-
♀
(539 bytes)
()
10/21/2009 postreply
20:54:39
•
i might misunderstood u.....
-撅着挺好-
♂
(361 bytes)
()
10/21/2009 postreply
21:43:09
•
回复:i might misunderstood u.....
-相逢是缘-
♀
(423 bytes)
()
10/21/2009 postreply
23:00:29