Memory leak from .NET plug-in

Ok, I’ve been doing some more testing with a reasonably complex command from a .NET plug-in.

Running it once gives a total memory leak of 3.5 Mb (650 leaks); running it twice increases this to 8.5 Mb (>4000 leaks).

I reported another memory issue last week and I think this is related.