Garbage Collection on CF devices

  • Thread starter Thread starter Joanne
  • Start date Start date
J

Joanne

Are there any differences between GC on the compact framework verses the
normal framework?

Do they doth suport the same number of default generations?
 
Hi,

Current version of .NET CF does not support generations for garbage
collection.

Are you experiencing a problem with GC? If yes, could you describe it?

Thanks

Ercan Turkarslan
Microsoft Mobile Devices Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Alex,

Thanks.

The article said this
"Different basic collection model. As we've seen, the .Net CF has a standard
mark and sweep collection model augmented with occasional compaction and
code pitching. While the high level goal (to reclaim memory allocated to
objects that are no longer used) is the same, the basic collection model on
the full .Net Framework is substantially different. In particular, the full
..Net Framework uses a "generational" model whereby objects that survive
collections are promoted to higher generations that are collected less
frequently. In this way, the collector on the full .Net Framework tunes
itself such that less time is spent analyzing objects that aren't likely to
be collected anyway. There are other differences as well. For example, the
full .Net Framework handles unusually large objects differently than normal
objects and the events that cause a GC to occur are different. Chapter 19
in Jeff Richter's "Applied .Net Framework Programming" book provides a
thorough, yet easily readable description of how garbage collection works on
the full .Net Framework."




***Does this mean that the CF model does not use multiple generations like
the normal framework does?***
 
Hi Joanne
Can weak references be used on the CF to recreate a strong referenced
object?

Yes, via System.WeakReference.Target. The same way things are done on
the full framework.

Regards

Mike
 
Back
Top