Making synchronizations increases the memory but this never gets down. After some time it may lead to issues like crashing for example.
Checking 2.7.13 release notes there are more than 60 leaks including memory leaks bug fixes:
- Issue #24469: Fixed memory leak caused by int subclasses without overridden
tp_free (e.g. C-inherited Cython classes).
- Issue #27330: Fixed possible leaks in the ctypes module.
- Issue #27932: Prevent memory leak in win32_ver().
- Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
- Issue #26718: super.__init__ no longer leaks memory if called multiple times.
NOTE: A direct call of super.__init__ is not endorsed!
- Issue #25745: Fixed leaking a userptr in curses panel destructor.
- Issue #25945: Fixed a crash when unpickle the functools.partial object with
wrong state. Fixed a leak in failed functools.partial constructor.
"args" and "keywords" attributes of functools.partial have now always types
tuple and dict correspondingly.
- Issue #25725: Fixed a reference leak in cPickle.loads() when unpickling
invalid data including tuple instructions.
- Issue #25688: Fixed file leak in ElementTree.iterparse() raising an error.
- Issue #27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer().
- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
- Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
functions of the audioop module. Fixed SystemError when the state is not a
tuple. Fixed possible memory leak.
Upgrading Python version could potentially alleviate/remove current memory leaks and increase general stability.