At the end of the function i believe the scope of the deviceMem ends. But
_memory._m_clDevPtr still points to the memory allocated by the function.
Will the pointer be pointing to something valid or not?