How to dynamic unload texture?

if you simply remove any pointer to it, it should be removed automatically