A colleague and I were speaking about browsers (using a browser control object in a project), and it appears as plain as day that all browsers (Firefox, Chrome, IE, Opera) display the same characteristic or side-effect from their usage and that being 'Leaking Memory'.
Can someone explain why that is the case? Surely as with any form of code, there should be proper garbage collection?
In modern browsers this is fully up to the web developer. Garbage-collected environments don't collect memory that is still being referenced to, and there are a lot of ways to keep referencing memory without meaning to (e.g. create a closure to attach as an event handler and accidentally include a bunch of variables in that closure's scope). A web developer can solve these leaks completely by properly handling variable references in their code. A page reload typically frees up the memory.
All modern browser engines are written in C++. C++ is not garbage-collected, but uses explicit memory allocation instead. If developers allocate memory and then forget to deallocate it, the engine leaks memory. To my knowledge all the browser makers do a lot of testing and code review to find and solve these kinds of leaks. It's not 100% fixed, and never will be, but it's not a huge problem anymore.
Finally there are a range of caching features that mean the browser's process will grow in scope while using it. These aren't leaks, they're intended to optimally make use of available RAM. Typically the memory footprint grows to a maximum and then hovers there.
The above pattern will leak due to the circular reference created between a DOM node and a JS element.
Since the JScript garbage collector is a mark and sweep GC, you may think that it would handle circular references. And in fact it does. However this circular reference is between the DOM and JS worlds. DOM and JS have separate garbage collectors. Therefore they cannot clean up memory in situations like the above.
I wouldn't be surprised if what you are categorizing as "leaks" is instead some aggressive cacheing. Even today, network round-trip time is "expensive" (time-wise) compared to fetching something from an in-memory cache. I'd recommend grabbing the source for Firefox or Chromium and taking a look at how they manage their caches. I know that Firefox at least supports re-opening recently-closed windows/tabs, so even completely closing a site doesn't necessarily mean that the cached images and scripts are evicted.
Why is it unrealistic to expect all browsers to support the same standards?
Why Firefox caching work will reset in version 3 but version 16 don't?