Scriptable object gets deleted with a class that holds it?

Hello guys, could you please help me?

There is a class that holds a scriptable object variable, with that variable being initialized.
Therefore instance of scriptable object was loaded into this variable.

The question is, if I delete the class that holds such variable, will the scriptable object instance be destroyed as well?
Or do I have to destroy the scriptable object first, and then delete the class?

Thank you very much!

If your scriptable object isn’t referenced anymore, Unity should handle the destruction of that scriptable object in your memory at the next Garbage Collection.