{"id":21134609,"url":"https://github.com/dmthuc/object-pool","last_synced_at":"2025-04-13T09:10:54.101Z","repository":{"id":194221353,"uuid":"125463630","full_name":"dmthuc/Object-Pool","owner":"dmthuc","description":"C++ Fast, Static and Generic Object Pool library with smart pointer","archived":false,"fork":false,"pushed_at":"2019-03-01T09:42:19.000Z","size":26,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T00:54:12.944Z","etag":null,"topics":["cpp14","objectpool","smart-pointer","static-object-pool-cpp"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmthuc.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}},"created_at":"2018-03-16T04:29:29.000Z","updated_at":"2024-07-26T06:23:29.000Z","dependencies_parsed_at":"2023-09-12T11:37:51.178Z","dependency_job_id":null,"html_url":"https://github.com/dmthuc/Object-Pool","commit_stats":null,"previous_names":["dmthuc/object-pool"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmthuc%2FObject-Pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmthuc%2FObject-Pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmthuc%2FObject-Pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmthuc%2FObject-Pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmthuc","download_url":"https://codeload.github.com/dmthuc/Object-Pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688565,"owners_count":21145766,"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":["cpp14","objectpool","smart-pointer","static-object-pool-cpp"],"created_at":"2024-11-20T06:31:57.216Z","updated_at":"2025-04-13T09:10:54.072Z","avatar_url":"https://github.com/dmthuc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Object-Pool with smart-pointer [![Build Status](https://travis-ci.org/dmthuc/Object-Pool.svg?branch=master)](https://travis-ci.org/dmthuc/Object-Pool)\n=====\n\n\nC++ Fast, Static and Generic Object Pool library with smart pointer  \nThis is static object pool library. It mean that object pool has fixed number of object it manages. Client can't add more object after initialization.  \nBecause it is static so there's no malloc and all operators except constructors are noexcept and fast.\n- Contact: minhthucdao1@gmail.com\n- Usage: just include pool.hpp into your source code\n\n```cpp\n#include \"pool.hpp\"\n\nPool\u003cint, 6\u003e pool;\nauto obj1 = pool.acquire();\nif (nullptr != obj.get())\n    dosomething(*obj);\nelse\n    throw(\"no object in pool available\");\n\n//with compound type, client can pass parameters for the constructor of containing object\nPool\u003cFoo, 6\u003e pool{args1, args2}\n\n//can also construct it with a range, this is the most useful case.\nvector\u003cFoo\u003e vec{Foo{1}, Foo{2});\n//each element of the range will be moved to pool, client have to keep track of number himself\nPool\u003cFoo, 2\u003e pool(vec.begin(), vec.end());\n\n//also can construct with initializer list, which will be copied from.\nPool\u003cFoo, 2\u003e pool{Foo{1}, Foo{2}};\n\n//iterate to const element\nfor(const auto\u0026 e: pool)\n    cout\u003c\u003ce;\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmthuc%2Fobject-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmthuc%2Fobject-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmthuc%2Fobject-pool/lists"}