Click here to Skip to main content
16,008,750 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: COM+ Application to Register my COM Component (VC++). Please Help ......... Pin
Brad Sokol29-Aug-03 2:52
Brad Sokol29-Aug-03 2:52 
GeneralXP Explorer Search like View Pin
Wild Wild Mike27-Aug-03 10:01
Wild Wild Mike27-Aug-03 10:01 
GeneralHandling ActiveX Events in VB Pin
nalinikanth26-Aug-03 3:34
nalinikanth26-Aug-03 3:34 
QuestionHow to run a script (.vbs) in VC++, Please help .... Pin
Atif Bashir26-Aug-03 2:43
Atif Bashir26-Aug-03 2:43 
AnswerRe: How to run a script (.vbs) in VC++, Please help .... Pin
palbano28-Aug-03 8:40
palbano28-Aug-03 8:40 
AnswerRe: How to run a script (.vbs) in VC++, Please help .... Pin
Vi229-Aug-03 4:36
Vi229-Aug-03 4:36 
Generalkeeping track of pointers to objects with STL Pin
Jeremy Pullicino26-Aug-03 0:04
Jeremy Pullicino26-Aug-03 0:04 
GeneralRe: keeping track of pointers to objects with STL Pin
Joaquín M López Muñoz26-Aug-03 3:32
Joaquín M López Muñoz26-Aug-03 3:32 
Hi Jeremy,

As you correctly point out, some sort of ref counting is needed to address your problem. IMHO providing CMyObj with the ref counting machinery is not a good idea as this artifact properly does not belong to CMyObj semantics, but rather it is imposed by external conditions (the necessity of storing CMyObj pointers into several containers).
A much cleaner approach is to use some sort of smart pointer that does the ref counting to the objects pointed to and deletes them when the objects are no further referenced. If you feel comfortable with Boost, check Boost Smart Pointers Library[^]: in particular, boost::shared_ptr does exactly what you need.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: keeping track of pointers to objects with STL Pin
Nemanja Trifunovic26-Aug-03 5:07
Nemanja Trifunovic26-Aug-03 5:07 
QuestionHow to load a cursor dymamically, from a dynamically created bitmap? Pin
Garuna25-Aug-03 22:20
Garuna25-Aug-03 22:20 
GeneralWTL + Time/Date information Pin
Ernesto D.23-Aug-03 22:00
Ernesto D.23-Aug-03 22:00 
GeneralRe: WTL + Time/Date information Pin
Stuart Dootson23-Aug-03 23:18
professionalStuart Dootson23-Aug-03 23:18 
GeneralRe: WTL + Time/Date information Pin
Steve S25-Aug-03 22:19
Steve S25-Aug-03 22:19 
GeneralRe: WTL + Time/Date information Pin
Ernesto D.26-Aug-03 9:46
Ernesto D.26-Aug-03 9:46 
GeneralRe: WTL + Time/Date information Pin
Rob Caldecott26-Aug-03 23:23
Rob Caldecott26-Aug-03 23:23 
GeneralRe: WTL + Time/Date information Pin
Ernesto D.27-Aug-03 14:54
Ernesto D.27-Aug-03 14:54 
GeneralRe: WTL + Time/Date information Pin
Rob Caldecott27-Aug-03 22:05
Rob Caldecott27-Aug-03 22:05 
GeneralRe: WTL + Time/Date information Pin
Steve S27-Aug-03 22:36
Steve S27-Aug-03 22:36 
GeneralRe: WTL + Time/Date information Pin
Ernesto D.28-Aug-03 17:12
Ernesto D.28-Aug-03 17:12 
GeneralRe: WTL + Time/Date information Pin
Steve S28-Aug-03 22:01
Steve S28-Aug-03 22:01 
GeneralRe: WTL + Time/Date information Pin
TW7-Sep-03 23:35
TW7-Sep-03 23:35 
Generalwheather can introduce book about ATL developing, best offer its E- version and HTTP link address. Pin
simonchen.net21-Aug-03 23:27
simonchen.net21-Aug-03 23:27 
GeneralRe: wheather can introduce book about ATL developing, best offer its E- version and HTTP link address. Pin
Roger Stewart25-Aug-03 15:23
professionalRoger Stewart25-Aug-03 15:23 
GeneralRe: wheather can introduce book about ATL developing, best offer its E- version and HTTP link address. Pin
Steve S25-Aug-03 22:34
Steve S25-Aug-03 22:34 
GeneralAbout ATL Pin
rqxiang21-Aug-03 21:24
rqxiang21-Aug-03 21:24 

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.