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

[DOC] Document that certain objects require manual cleanup #32

Open
leofang opened this issue Mar 12, 2021 · 3 comments
Open

[DOC] Document that certain objects require manual cleanup #32

leofang opened this issue Mar 12, 2021 · 3 comments
Assignees

Comments

@leofang
Copy link
Member

leofang commented Mar 12, 2021

For example, users need to call Request.Free() explicitly, see the discussion around #29 (comment).

@leofang leofang self-assigned this Mar 12, 2021
@leofang
Copy link
Member Author

leofang commented Jul 20, 2021

This needs:

  1. a short example added to Tutorial
  2. docstrings added to the relevant classes (ex: Request)

@leofang
Copy link
Member Author

leofang commented Jul 21, 2021

@dalcinl If IIUC non-default instances of the following 9 (*) classes need an explicit destructor call:

  • Datatype
  • Win
  • Request
  • Op
  • Info
  • Group
  • Comm
  • Errhandler
  • File (* should call Close() instead of Free())

@dalcinl
Copy link
Member

dalcinl commented Jul 21, 2021

Yes. Request is a bit special. For Request instances, Wait() or Test() methods implicitly work as a destructor. Prequest (subclass of Request) instances always require a Free() call.

The case of Comm, Win, and File is also a bit special, as the Free() or Close() calls are collective. A consequence of this is that these destructors could never be let in the hand of Python's garbage collector.

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