Type-erasure memory management. No leaks now possible