From e87d516b1d192c7e1d28c95dfde860edf8569236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=A4=B4=E4=BA=91?= Date: Fri, 20 Mar 2020 12:20:28 +0800 Subject: [PATCH] Update tls_pointer.h --- include/tls_pointer.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/include/tls_pointer.h b/include/tls_pointer.h index 6cf28d6..fa6cced 100755 --- a/include/tls_pointer.h +++ b/include/tls_pointer.h @@ -29,19 +29,17 @@ IPC_EXPORT void* get(key_t key); /* * * - * 1. In Windows, if you do not compile thread_local_ptr.cpp, - * use thread_local_ptr will cause memory leaks. - * - * 2. You need to set the thread_local_ptr's storage manually: - * ``` - * tls::pointer p; - * if (!p) p = new int(123); - * ``` - * Just like an ordinary pointer. Or you could just call create: - * ``` - * tls::pointer p; - * p.create(123); - * ``` + * You need to set the ipc::tls::pointer's storage manually: + * ``` + * tls::pointer p; + * if (!p) p = new int(123); + * ``` + * It would be like an ordinary pointer. + * Or you could just call create to 'new' this pointer automatically. + * ``` + * tls::pointer p; + * p.create(123); + * ``` */ template