Have a careful read of the comment for that method - the pointer it returns isn't a new object, it's just a pointer to the MemoryBlock that the var owns. (Unfortunately I couldn't make it return a MemoryBlock& because it may return nullptr, and it can't return a const MemoryBlock* because you may want to change the data)
If it's leaking, then either you're leaking the var that contains it, or something more subtle is going wrong inside the var class, but I haven't seen any problems like that myself.