Code

python: Fix memory leaks.