Optimize memory management.

Don't keep track of finalized statements.