{"id":28789496,"url":"https://github.com/ryuheechul/racautodisposer","last_synced_at":"2025-09-05T02:33:22.141Z","repository":{"id":18812012,"uuid":"22026614","full_name":"ryuheechul/RACAutoDisposer","owner":"ryuheechul","description":"Dispose RACSubscriptions with an easy way","archived":false,"fork":false,"pushed_at":"2020-04-03T06:54:36.000Z","size":340,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-19T06:37:04.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/ryuheechul.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}},"created_at":"2014-07-20T05:22:17.000Z","updated_at":"2015-06-18T06:56:07.000Z","dependencies_parsed_at":"2022-09-25T02:40:39.264Z","dependency_job_id":null,"html_url":"https://github.com/ryuheechul/RACAutoDisposer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ryuheechul/RACAutoDisposer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuheechul%2FRACAutoDisposer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuheechul%2FRACAutoDisposer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuheechul%2FRACAutoDisposer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuheechul%2FRACAutoDisposer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryuheechul","download_url":"https://codeload.github.com/ryuheechul/RACAutoDisposer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuheechul%2FRACAutoDisposer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273702365,"owners_count":25152878,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-06-17T22:10:49.658Z","updated_at":"2025-09-05T02:33:22.115Z","avatar_url":"https://github.com/ryuheechul.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RACAutoDisposer\n\n[![Version](https://img.shields.io/cocoapods/v/RACAutoDisposer.svg?style=flat)](http://cocoadocs.org/docsets/RACAutoDisposer)\n[![License](https://img.shields.io/cocoapods/l/RACAutoDisposer.svg?style=flat)](http://cocoadocs.org/docsets/RACAutoDisposer)\n[![Platform](https://img.shields.io/cocoapods/p/RACAutoDisposer.svg?style=flat)](http://cocoadocs.org/docsets/RACAutoDisposer)\n\n### Have a trouble because your RAC Subscriptions are being called even though you want them to be gone after reuse your views like UITableViewCell?\n\n## Solve the problem with adding few lines of code.\n\nJust say you want the last subscription to be gone when this code called again.\n\n```objective-c\n@RACAutoDispose(@\"[key-to-be-unique-in-a-scope]\", {\n  [RACObserve(self, object)\n     subscribeNext:^(id x) {\n         // ...\n     }];\n})\n```\n\n### !Need to implemnt RACAutoDisposerProtocol to the scope object include @RACAutoDispose code\n\n```objective-c\n@interface ScopeObjectIncludesRACAutoDisposeCode () \u003cRACAutoDisposerProtocol\u003e\n```\n\nOther wise you will have warnings and unreleased RACDisposals which is a memory issue.\n\n### What do you mean scope?\n\nif your @RACAutoDispose codes are in same object, then it is in same scope.\nso keys need to be unique in a same scope to distinguish each disposals.\n\n\n## How it works?\n\n- RACAutoDisposer holds last RAC Disposals(subscriptions) by key and scope when @RACAutoDispose called.\n- RACAutoDisposer dispose the last Disposal with same key when same code called again. and hold new ones again.\n- RACAutoDisposer release disposals when the scope object is deallocated.\n\n### Sample Project\n\nopen Example/RACAutoDisposer.xcworkspace and run and see the results in console.\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\nARC, ReactiveCocoa.\n\n## Installation\n\nRACAutoDisposer is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n    pod \"RACAutoDisposer\"\n\n## Author\n\nRyu Heechul, ryuhcii@gmail.com\n\n## License\n\nRACAutoDisposer is available under the MIT license. See the LICENSE file for more info.\n\n## Contribution\n\nwelcome your contributions!\nsend me pull requests or open a issue and give me an idea to make this better!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuheechul%2Fracautodisposer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryuheechul%2Fracautodisposer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuheechul%2Fracautodisposer/lists"}