You have to remove items from a house to save them to your inventory. If you just demolish the house then you lose everything that's on the site.
The best thing to do is to go through the house and delete each individual room, basement, balcony, patio and swimming pool - this will earn you simoleons as well as automatically storing items in the inventory. You will then need to remove any items outside the house (cars, garden furniture, plants, etc) as well. When the site is completely clear then it's safe to go ahead and demolish the site.