Skip to content

initialize and finalize and destroy #155

@jkozdon

Description

@jkozdon

Do we ever see a use case where we might have something like:

PETSc.initialize(petsclib)
# ... work....
PETSc.finalize(petsclib)

# start PETSc again...
PETSc.initialize(petsclib)

I ask because this can cause problems with the garbage collector in when it's used. For instance, if the garbage collector is run on a PETSc object allocated in the first chunk of work AFTER petsc has been re-initialized this is an error since the actual PETSc object doesn't exist anymore. The destroy has a check for whether PETSc is finalized, but this will not catch PETSc having been re-initialized.

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