I really suggest you to read a book about C++!
Also you can highlight your code by adding '=cpp' within the opening code tag.
And third it's more common to use delete instead of deallocate.
Now for your problem:
sf::Sprite does take the reference to the texture, thus you can't hand over the pointer directly and you need to dereference it, as you did.
Since a reference is in some way also just a pointer to the original object, the object won't be copied and the sprite doesn't care about it's lifetime etc.
Thus a resource manager could load all the textures and resources, then you can hand the textures to the sprites and at the end the resource manager takes care of the destruction.
If you don't want to implement your own resource manager you could also use the one from
Thor, but maybe that's again a bit overkill.