Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Smart pointers Pin
JackDingler15-Nov-11 11:26
JackDingler15-Nov-11 11:26 
GeneralRe: Smart pointers Pin
Pascal Ganaye15-Nov-11 11:32
Pascal Ganaye15-Nov-11 11:32 
GeneralRe: Smart pointers Pin
JackDingler15-Nov-11 11:42
JackDingler15-Nov-11 11:42 
GeneralRe: Smart pointers Pin
Pascal Ganaye15-Nov-11 11:46
Pascal Ganaye15-Nov-11 11:46 
GeneralRe: Smart pointers Pin
JackDingler15-Nov-11 12:01
JackDingler15-Nov-11 12:01 
GeneralRe: Smart pointers Pin
Pascal Ganaye15-Nov-11 21:52
Pascal Ganaye15-Nov-11 21:52 
GeneralRe: Smart pointers Pin
JackDingler16-Nov-11 2:04
JackDingler16-Nov-11 2:04 
GeneralRe: Smart pointers Pin
Erudite_Eric15-Nov-11 22:32
Erudite_Eric15-Nov-11 22:32 
You would need to have a class that manages allocation and manages the pointers pointing to that allocaiton so that when the allocation is freed all the pointers are NULLed.

Since the allocations are to be shared, you would want to have some way of refering to those allocations, so that if some code needs an address it calls this class, and if it exists, the existing address is given back, if not, it is created.

This class would need to manage access to the address so that only one caller at a time can modify the data.

Finally a new class, for the pointers them selves that can track when a pointer is copied so that the new pointer can be added to the list of pointers managed.


This is complex though and easilly broken, but could be interesting to try to do.
==============================

Nothing to say.

GeneralRe: Smart pointers Pin
Stefan_Lang17-Nov-11 4:37
Stefan_Lang17-Nov-11 4:37 
GeneralRe: Smart pointers Pin
Pascal Ganaye17-Nov-11 4:59
Pascal Ganaye17-Nov-11 4:59 
GeneralRe: Smart pointers Pin
Stefan_Lang17-Nov-11 5:47
Stefan_Lang17-Nov-11 5:47 
GeneralRe: Smart pointers Pin
Pascal Ganaye18-Nov-11 0:09
Pascal Ganaye18-Nov-11 0:09 
GeneralRe: Smart pointers Pin
Stefan_Lang18-Nov-11 0:28
Stefan_Lang18-Nov-11 0:28 
QuestionCreateFile after CloseHandle Pin
aangerma14-Nov-11 23:49
aangerma14-Nov-11 23:49 
AnswerRe: CreateFile after CloseHandle Pin
User 742933814-Nov-11 23:58
professionalUser 742933814-Nov-11 23:58 
GeneralRe: CreateFile after CloseHandle Pin
aangerma15-Nov-11 0:09
aangerma15-Nov-11 0:09 
AnswerRe: CreateFile after CloseHandle Pin
User 742933815-Nov-11 0:20
professionalUser 742933815-Nov-11 0:20 
GeneralRe: CreateFile after CloseHandle Pin
aangerma15-Nov-11 0:35
aangerma15-Nov-11 0:35 
GeneralRe: CreateFile after CloseHandle Pin
Erudite_Eric15-Nov-11 1:37
Erudite_Eric15-Nov-11 1:37 
GeneralRe: CreateFile after CloseHandle Pin
Vaclav_15-Nov-11 10:45
Vaclav_15-Nov-11 10:45 
GeneralRe: CreateFile after CloseHandle Pin
Erudite_Eric15-Nov-11 21:19
Erudite_Eric15-Nov-11 21:19 
QuestionHide folder in window explorer Pin
MKC00214-Nov-11 22:40
MKC00214-Nov-11 22:40 
AnswerRe: Hide folder in window explorer Pin
Richard MacCutchan14-Nov-11 23:07
mveRichard MacCutchan14-Nov-11 23:07 
GeneralRe: Hide folder in window explorer Pin
MKC00215-Nov-11 21:33
MKC00215-Nov-11 21:33 
GeneralRe: Hide folder in window explorer Pin
Richard MacCutchan15-Nov-11 21:46
mveRichard MacCutchan15-Nov-11 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.