std::unique_ptrのコンストラクタのページに自作デリータを使った例を追加してみました。 念の為、Valgrindでメモリリークが無いことを確認してます。 std::unique_ptrに自作デリータの使用例を追加 … Verified 37f60c5 View details faithandbrave merge
std::allocator<int> alloc_; }; int main() { // (1) デフォルト構築 @@ -133,6 +147,16 @@ int main() std::unique_ptr<int> p3(new int(3), std::default_delete<int>()); assert(p3); // 自作デリータを使った例 { std::allocator<int> alloc; int* p = AllocTraits::alloc...
void cppcms::http::context::submit_to_pool ( booster::shared_ptr< application_specific_pool > pool, std::string const & matched_url ) Submit the context to alternative pool - allows to transfer context from application to application, matched_url would be given to application::main for...
#include <booster/auto_ptr_inc.h> #include <string> #include <booster/copy_ptr.h> #include <booster/hold_ptr.h> #include <booster/noncopyable.h> Go to the source code of this file. Classes classbooster::shared_ptr< T > classbooster::weak_ptr< T > ...
Softimage to Maya Bridge Guide Basics Managing Scenes, Files, and Projects Data Exchange Environment Variables Modeling Animation Character Animation Motion Graphics Character Effects and Environment Building Simulation and Effects Lighting and Shading
Prefer to use `std::unique_ptr` to make ownership transfer explicit. For example: [R.20]: Use `std::unique_ptr` or `std::shared_ptr` to represent ownership [R.21]: Prefer `unique_ptr` over `shared_ptr` unless you need to share ownership Copy link...
(node& node, shared_memory_holder pMemory) { m_pData->push_back(node, pMemory); } void insert(node& key, node& value, shared_memory_holder pMemory) { m_pData->insert(key, value, pMemory); } // indexing template <typename Key> node* get(const Key& key, shared_memory_holder p...
Member cppcms::http::context::submit_to_asynchronous_application (booster::intrusive_ptr< application > app, std::string const &matched_url) Member cppcms::http::context::submit_to_pool (booster::shared_ptr< application_specific_pool > pool, std::string const &matched_url) Member cppcms::...
266 static void dispatch(booster::intrusive_ptr<application> const &app,std::string const &url,bool syncronous); 267 void try_restart(bool e); 268 booster::shared_ptr<context> self(); 269 270 struct _data; 271 booster::hold_ptr<_data> d; ...
247 typedef std::vector<booster::shared_ptr<file> > files_type; 248 252 cookies_type const &cookies(); 256 cookie const &cookie_by_name(std::string const &name); 261 std::string get(std::string const &name); 266 std::string post(std::string const &name); 270 form_type const ...