Tag Info

Hot answers tagged

2

Under normal circumstances, cyclical references are not a problem for the GC, because it can detect them. But here, the whole object graph looks like this (based on looking at the reference source): So, the problem isn't just the cycle, it's that you have a static field that references the cycle. What you could do to fix this is to break the cycle ...


1

Consider a class that implements IDisposable, but when it is not disposed by its user, it will not become eligible for garbage collection, thus its destructor won’t run, and resources will be leaked. Your presumption is incorrect. All classes are disposed and a properly written implementation of IDisposable will not leak resources. To be absolutely ...


1

I think the performance cost of 1 copy versus 3 for an API being hit "hundreds of thousands of times per day" is fairly negligible; either way, they must both share some of the same resources, and be subject to the same potential bottlenecks. What I'd be more concerned with is the additional cognitive overhead of having 3 APIs, in terms of server ...



Only top voted, non community-wiki answers of a minimum length are eligible