A minimalistic kind of read-copy-update class
Serious issues with this:

Memory Management.
Not using RAII to lock/unlock

Memory Management
Don't pass pointers it does not indicate owners. Always wrap pointers in a smart pointer. Have a look at std::unique_ptr.
But for types like Data there is no need to use pointers. Simply use Data as the object type (not Data*).
RAII
Look up the concept of RAII.
A good example is std::lock_guard https://en.cppreference.com/w/cpp/thread/lock_guard This shows you how to use RAII to automate the processes of lock/unlock so it is exception safe.