Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
doug251-Jan-10 16:28
doug251-Jan-10 16:28 
AnswerRe: Restricting rights to delete a dynamic array ? Pin
Moak3-Jan-10 11:05
Moak3-Jan-10 11:05 
GeneralRe: Restricting rights to delete a dynamic array ? [modified] Pin
doug254-Jan-10 9:10
doug254-Jan-10 9:10 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
Moak4-Jan-10 12:01
Moak4-Jan-10 12:01 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
doug254-Jan-10 12:27
doug254-Jan-10 12:27 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
doug255-Jan-10 2:40
doug255-Jan-10 2:40 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
Moak5-Jan-10 3:41
Moak5-Jan-10 3:41 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
doug255-Jan-10 15:10
doug255-Jan-10 15:10 
I was going to have a look at the boost shared / smart pointers that have definately been well implememented but I downloaded boost and my computer started playing up, well the file menu in the boost zip folder stopped working, and it was fine in other zip folders. No virus's detected. So I'll stay away from smart pointers at the moment cause I don't need them (although technically maybe the InternalArray class is a kind of smart pointer cause it is used like a pointer and means delete can't be called on it).

I don't want to use a vector because with full optimizations vector lookups are about 8200 times slower than dynamic arrays meaning you could do 8200 * 1000000 accesses to elements using a dynamic array in the time it takes to do 1000000 using a vector, which should make a fair difference in the program i'm writing and it's not only the resize and clear functions that call element destructors, even inserting an element will call destructors for all the other elements in the vector, or at least the ones that change position in the internal array. I don't see why a standard container would be implemented so destructors of elements are called when the array is resized, but of course I know why it works like that just not why someone decided to implement a vector / map etc. like that.

well, I'm happy with the code I've written

thanks for the advice / suggestions Smile | :)
GeneralRe: Restricting rights to delete a dynamic array ? Pin
doug255-Jan-10 16:44
doug255-Jan-10 16:44 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
Moak5-Jan-10 23:16
Moak5-Jan-10 23:16 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
doug256-Jan-10 3:43
doug256-Jan-10 3:43 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
Moak6-Jan-10 12:51
Moak6-Jan-10 12:51 
GeneralRe: Restricting rights to delete a dynamic array ? [modified] Pin
doug256-Jan-10 16:14
doug256-Jan-10 16:14 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
Moak7-Jan-10 1:03
Moak7-Jan-10 1:03 
GeneralRe: Restricting rights to delete a dynamic array ? Pin
doug257-Jan-10 11:38
doug257-Jan-10 11:38 
Questioncommunication between objects Pin
Alex80gbg1-Jan-10 8:44
Alex80gbg1-Jan-10 8:44 
AnswerRe: communication between objects Pin
Rozis2-Jan-10 8:17
Rozis2-Jan-10 8:17 
GeneralRe: communication between objects Pin
Alex80gbg2-Jan-10 11:52
Alex80gbg2-Jan-10 11:52 
QuestionLNK2019 for XmlLite Pin
A&Ms1-Jan-10 8:30
A&Ms1-Jan-10 8:30 
AnswerRe: LNK2019 for XmlLite Pin
A&Ms1-Jan-10 11:14
A&Ms1-Jan-10 11:14 
GeneralRe: LNK2019 for XmlLite Pin
conrad Braam3-Jan-10 4:04
conrad Braam3-Jan-10 4:04 
QuestionPort 7078 and 7077 blocked in Vista Pin
Larry Mills Sr1-Jan-10 6:00
Larry Mills Sr1-Jan-10 6:00 
QuestionNeed help with member function pointer Pin
anbluemoon31-Dec-09 19:18
anbluemoon31-Dec-09 19:18 
AnswerRe: Need help with member function pointer Pin
KingsGambit31-Dec-09 19:44
KingsGambit31-Dec-09 19:44 
GeneralRe: Need help with member function pointer Pin
anbluemoon31-Dec-09 21:14
anbluemoon31-Dec-09 21:14 

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.