Will this leak memory?

Okay, that's fine. Just wondering how it will solve the OP problem right now.