Fixing memory allocation in ProxyManager to work under release builds.

Because apparently I am the biggest idiot on the planet. You see, this is
what happens when you let a non-C++ developer hack around with C++.