did julia has function similar to R_Preserveobject and R_ReleaseObject function?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

did julia has function similar to R_Preserveobject and R_ReleaseObject function?

Yu Gong
I know julia has jl_gc_push and jl_gc_pop macros ,but it only can used in a function.
I want define a variable and lock it in one function  ,and unlock it in other function if need and aviod gc to release it untile call unlock.
R have R_Preserveobject and R_ReleaseObject to do this.did julia has function similar to R_Preserveobject and R_ReleaseObject function?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

did julia has function similar to R_Preserveobject and R_ReleaseObject function?

Yu Gong
Sorry ,fotgot it  i mean function in  julia c api
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

did julia has function similar to R_Preserveobject and R_ReleaseObject function?

Yu Gong
In reply to this post by Yu Gong
I mean function in julia c api
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: did julia has function similar to R_Preserveobject and R_ReleaseObject function?

Yichao Yu
In reply to this post by Yu Gong
On Tue, Jul 26, 2016 at 8:01 AM, Yu Gong <[hidden email]> wrote:
> I know julia has jl_gc_push and jl_gc_pop macros ,but it only can used in a function.
> I want define a variable and lock it in one function  ,and unlock it in other function if need and aviod gc to release it untile call unlock.
> R have R_Preserveobject and R_ReleaseObject to do this.did julia has function similar to R_Preserveobject and R_ReleaseObject function?

No. You can create a global/rooted array/dict and push/pop object from it.
Loading...