Closed rainman110 closed 4 months ago
added 3 commits
added 17 commits
master
marked this merge request as ready
added 4 commits
added 8 commits
master
added 2 commits
In GitLab by @marvinoe21 on Mar 13, 2024, 10:37
Commented on src/module/utilities/pythonextensions/gtpy_propertysetter.h line 19
In a Python Task script create a calculator and call a setter method to set a property. E.g.:
pythonScriptEditor = GtpyScriptCalculator("Python Script Editor")
pythonScriptEditor.setScript("print('Hello')")
In GtpyExtendedWrapper_getattro this function is called to create setter methods for GtProperties of GtObjects.
In GitLab by @marvinoe21 on Mar 13, 2024, 10:43
Commented on src/module/utilities/pythonextensions/gtpy_propertysetter.cpp line 213
@rainman110 You're right! It looks like a leak.
In GitLab by @marvinoe21 on Mar 13, 2024, 10:59
Commented on src/module/gt_python.cpp line 302
Should these shared functions be merged into the master?
I would say yes. They are only active in dev mode. Can be used for testing.
resolved all threads
changed this line in version 19 of the diff
changed this line in version 19 of the diff
mentioned in commit 17787a89e7f460a22c7d972c60727c2b2dc3e704
_Merges python_cppapi -> master
This refactoring provides RAII style wrappers for PyObject. In fact, using these changes, I could reduce many memory leaks (see #264). This wrapper should make the manual refcounting unnecessary and hence should reduce the number of potential programming errors, making the code also much more thread safe.
I tested the code using address sanitizer, showing no more memory leaks.
Closes #256, #263, #264