{"id":15888225,"url":"https://github.com/corecii/roblox-instancedestroyed","last_synced_at":"2025-04-02T16:44:19.196Z","repository":{"id":105909333,"uuid":"113139460","full_name":"Corecii/roblox-instanceDestroyed","owner":"Corecii","description":"Detects when an Instance will never re-appear in the game tree. Fires on Destroy and garbage-collection.","archived":false,"fork":false,"pushed_at":"2017-12-05T08:38:12.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T07:25:14.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Corecii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-05T05:57:46.000Z","updated_at":"2022-07-07T21:25:15.000Z","dependencies_parsed_at":"2024-06-13T11:41:51.898Z","dependency_job_id":null,"html_url":"https://github.com/Corecii/roblox-instanceDestroyed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corecii%2Froblox-instanceDestroyed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corecii%2Froblox-instanceDestroyed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corecii%2Froblox-instanceDestroyed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corecii%2Froblox-instanceDestroyed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Corecii","download_url":"https://codeload.github.com/Corecii/roblox-instanceDestroyed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246853363,"owners_count":20844567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T06:06:48.732Z","updated_at":"2025-04-02T16:44:19.174Z","avatar_url":"https://github.com/Corecii.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Documentation\nThis module can be used to detect when an instance is destroyed at any point after it is used on the object.  \nIt will detect when the object is `Destroy`ed from the game hierarchy, when it is `Destroy`ed from nil, and when it is garbage-collected.  \nThe call returns a pseudo-signal which can be used to check if the function is connected and can be used to disconnect the on-destroy-function without causing it to fire.\n\t\t\n\t\t\n* pseudoSignal module(Instance instance, function func)  \nAttach the function 'func' to be called when the Instance 'instance' is destroyed\n\n\n* pseudoSignal\n  * boolean         .connected, .Connected  \nIf the function provided is still connected then this is true. When the object is destroyed this is set to false before the function is called.  \nThis can only be false if the object is destroyed or if this is manually disconnected.\n\n  * void            :disconnect(), :Disconnect()  \nManually disconnects the connected function before the object is destroyed.\n\n  * RBXScriptSignal .connection  \nThis is the actual connection to the instance's AncestryChanged event. This should not be messed with.\n\n\n# Changes pre-git-repo\n* Edit 5:  \nClarify comments on coroutine.yield because behavior has changed from [end of current execution cycle] to [beginning of next execution cycle]\n* Version 4:  \nFixed garbage collection detection.\n* Edit 3:  \nClarified/fixed some terminology. (comments only)\n* Version 2:  \nMade it not prevent garbage collection by using ObjectValues\n* Version 1:  \nInitial\n\nSee original Gist for diffs: https://gist.github.com/Corecii/2c86fb338802a618e3ff376d61409b1b\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorecii%2Froblox-instancedestroyed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorecii%2Froblox-instancedestroyed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorecii%2Froblox-instancedestroyed/lists"}