Skip to content

finalizer may never be called #515

Closed
@dpinol

Description

@dpinol

Is your feature request related to a problem? Please describe.
In Julia, it looks like finalizers are always called when exiting.
E.g., the following code always prints "hola".

mutable struct S
    a
end
function S()
    return finalizer(_->Core.println("hola"), S(3))
end
S()

However, if we wrap it with juliacall, the finalizer is never executed.

import juliacall
juliacall.Main.include("kk.jl")

Describe the solution you'd like
I'd like finalizers to always be executed

Describe alternatives you've considered
My current workaround is finishing with

juliacall.Main.GC.gc()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions