memory - .net - Signal to the Garbage Collector than an object is ready for removal? -
i reading on performance of .net garbage collector, , i'm building set of inter-referencing classes data model. have implemented delete() methods dereference object connected objects, ensuring object collectable.
while not know if issue application, got thinking happen objects promoted later generations , deleted. possible remain in memory long time.
is possible tell garbage collector particular object should 'demoted' , freed during next gen0 collection?
one of optimisations possible garbage collector leave objects unreferenced objects in memory long possible deferring collection until absolutely necessary. can yield fewer collections , mutualise cost of collection across more objects/memory.
is problem if objects remain in memory long time after being dereferenced? if machine has enough free memory , application's footprint after dereferencing not growing there downside?
the collection cost guaranteed cost whereas cost of using memory not - may or may not impact program/other programs. key point of optimisation give cost in exchange uncertain one.
Comments
Post a Comment