In C++ it is easily possible to have a permanent memory leak - just allocate memory and don\'t release it:
new char; //permanent memory leak guaranteed
Easiest memory leak:
public static class StaticStuff { public static event Action SomeStaticEvent; } public class Listener { public Listener() { StaticStuff.SomeStaticEvent+=DoSomething; } void DoSomething() {} }
instances of Listener will never be collected.