Deploying a contract uses RAM. If I deploy a contract, am I going to get the RAM back? In not, is there any other way to get it back?
EDIT, ANSWER, YES:
Just re-deploy another contract instead, that does not use as much RAM.
EOS.IO Stack Exchange is a question and answer site for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO. It only takes a minute to sign up.Sign up to join this community
You answered your own question in a few minutes, but I'll post this anyway since I typed it out.
Let's say you deploy an eosio.token contract that allows users to create their own 0 balance to opt into an air drop. That's ~188kb for you and ~0.3kb per user to create their row. That user has committed RAM to have the ability to execute a transfer command in the future. If you set an empty contract (I believe this is the way of freeing up the RAM) then you should be able to get your RAM back; however, if your users do not have the ability to execute transfer commands or free their RAM if they've transferred all their tokens, then they will be unhappy and will ask you to remedy the situation somehow.
I'm not sure if pushing an empty contract with set contract is the way to go (being that is also wants an ABI) or if setting the code with an empty WASM would be better and maybe the ABI is just a sunk cost.