Should ConditionalWeakTable be used for non-compiler purposes?

I don’t see anything wrong with using ConditionalWeakTable. If you need ephemerons, you pretty much have no other choice. I don’t think future .NET versions will be a problem – even if only compilers would use this class, Microsoft still couldn’t change it without breaking compatibility with existing binaries. As for overhead – there certainly … Read more

Is this a bug in MonoTouch GC?

This is an unfortunate side-effect of MonoTouch (who is garbage collected) having to live in a reference counted world (ObjectiveC). There are a few pieces of information required to be able to understand what’s going on: For every managed object (derived from NSObject), there is a corresponding native object. For custom managed classes (derived from … Read more

Any hard data on GC vs explicit memory management performance?

This turns into another flamewar with a lot of “my gut feeling”. Some hard data for a change (papers contain details, benchmarks, graphs, etc.): http://www.cs.umass.edu/~emery/pubs/04-17.pdf says: “Conclusion. The controversy over garbage collection’s performance impact has long overshadowed the software engineering benefi it provides.This paper introduces a tracing and simulation-based oracular memory manager. Using this framework, … Read more

Guidelines For Dispose() and Ninject

The CLR documentation states that whoever creates a Disposable object is responsible for calling Dispose. In this case the object is created by Ninject. That means you should not call Dispose explicitly. Ninject disposes every Disposable object that has another scope other than InTransientScope as soon as the scope object to which the created object … Read more

Why disable the garbage collector?

One use for disabling the garbage collector is to get more consistent results when timing the performance of code. The timeit module does this. def timeit(self, number=default_number): if itertools: it = itertools.repeat(None, number) else: it = [None] * number gcold = gc.isenabled() gc.disable() … In Python2 and up to Python3.2 gc.disable() is also used to … Read more

JVM G1GC’s mixed gc not collecting much old regions

well, you didnt mentioned all arguments you set, but you could try to set -XX:+ScavengeBeforeFullGC and you should also think about your Objects lifecycle. how long do your applications Objects live and what size are the Objects. think about it and take a look at the following arguments -XX:NewRatio=n old/new ration (default 2) -XX:SurvivorRatio=n eden/survivor … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)