Skip to content

Commit 5b8d4c4

Browse files
committed
issue #257
1 parent 884285e commit 5b8d4c4

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Changelog
2121

2222
- Project resource ``default_version`` attribute was returned as a dict instead of being converted to
2323
Resource object
24+
- Resource object was leaking memory during initialization (`Issue #257 <https://github.com/maxtepkeev/python-redmine/
25+
issues/257>`__) (thanks to `yihli <https://github.com/qianyi3210>`__)
2426

2527
**Documentation**:
2628

redminelib/resources/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def __init__(self, manager, attributes):
139139
relations_includes = self._relations + self._includes
140140

141141
self.manager = manager
142-
self._create_readonly += relations_includes
143-
self._update_readonly += relations_includes
142+
self._create_readonly = self._create_readonly[:] + relations_includes
143+
self._update_readonly = self._update_readonly[:] + relations_includes
144144
self._decoded_attrs = dict(dict.fromkeys(relations_includes), **attributes)
145145
self._encoded_attrs = {}
146146
self._changes = {}

0 commit comments

Comments
 (0)