Added the ability to release all resources.
Added resource freeing to the mult example.