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

Implement proper deallocation #996

Open
Tracked by #1600
certik opened this issue Aug 19, 2022 · 2 comments
Open
Tracked by #1600

Implement proper deallocation #996

certik opened this issue Aug 19, 2022 · 2 comments

Comments

@certik
Copy link
Contributor

certik commented Aug 19, 2022

Of:

And anything else that might leak memory currently.

@certik certik mentioned this issue Aug 19, 2022
9 tasks
@czgdp1807
Copy link
Collaborator

The deallocation should be implicit (done by LPython), explicit (done by user via del statements), right?

@certik
Copy link
Contributor Author

certik commented Aug 20, 2022

Yes, implicit when the (allocatable) variable goes out of scope. I think dicts, lists, strings should have "allocatable" set, and then we should add some mechanism into libasr that both LFortran and LPython can use to automatically insert the "ImplicitDeallocate" ASR nodes.

And del would delete it right away explicitly, just like deallocate in LFortran.

@certik certik mentioned this issue Mar 21, 2023
38 tasks
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

No branches or pull requests

2 participants