Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

903 inappropriately disowns memory in python #1690

Merged
merged 2 commits into from
May 23, 2024

Conversation

hchen99
Copy link
Contributor

@hchen99 hchen99 commented Apr 9, 2024

No description provided.

@hchen99 hchen99 linked an issue Apr 9, 2024 that may be closed by this pull request
@coveralls
Copy link

Coverage Status

coverage: 55.956% (+0.004%) from 55.952%
when pulling 415eda8 on 903-inappropriately-disowns-memory-in-python
into 0482202 on master.

test_so.a = trick.Cat()
#test_so.a = trick.Cat()
# use MM to allocate memory for a pointer declared in S_define
test_so.a = trick.TMM_declare_var_s("Cat")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tried using:

test_so.a = trick.Cat()
trick.TMM_declare_ext_var_s(test_so.a, "Car test_so_a")

This is the more typical method we use when using Python allocation.

@sharmeye sharmeye merged commit a1d151c into master May 23, 2024
13 checks passed
Pherring04 pushed a commit that referenced this pull request Jul 9, 2024
…stead base on "own" value of the input object. (#1690)
@hchen99 hchen99 deleted the 903-inappropriately-disowns-memory-in-python branch September 19, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trick inappropriately disowns memory allocated in Python
4 participants