Skip to content

Implement proper deallocation #996

Open

Description

@certik

Of:

And anything else that might leak memory currently.

Activity

  1. czgdp1807 commented on Aug 19, 2022

    @czgdp1807
    Collaborator

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

  2. certik commented on Aug 20, 2022

    @certik
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions