{"action":"closed","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/3067","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/3067/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/3067/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/3067/events","html_url":"https://github.com/JuliaLang/julia/issues/3067","id":14162589,"number":3067,"title":"order of simultaneous garbage collection","user":{"login":"mlubin","id":1733683,"avatar_url":"https://avatars.githubusercontent.com/u/1733683?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2013-05-09T19:47:57Z","updated_at":"2015-06-01T23:02:46Z","closed_at":"2015-06-01T23:02:46Z","body":"This code:\r\n```julia\r\ntype foo\r\n    x\r\nend\r\n\r\nfunction f()\r\n    a = foo(0)\r\n    b = foo(a)\r\n    finalizer(a,(t)->println(\"GC'd a\"))\r\n    finalizer(b,(t)->println(\"GC'd b\"))\r\n    return\r\nend\r\n\r\nf()\r\ngc()\r\n```\r\n\r\nsometimes outputs\r\n```\r\nGC'd a\r\nGC'd b\r\n```\r\nand sometimes\r\n```\r\nGC'd b\r\nGC'd a\r\n```\r\n\r\nSo there's no guarantee that when the finalizer is called, the members of an object remain valid? Is this intended? This was causing an issue with a C library that wants certain objects to be released in order."}}