Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Hopefully fixed "Writes to freed blocks" bug in ide - and warning (quiz)
Re: Hopefully fixed "Writes to freed blocks" bug in ide - and warning (quiz) [message #12290 is a reply to message #12287] Tue, 23 October 2007 18:20 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
luzr wrote on Tue, 23 October 2007 18:08


No, it can resize the array if you use i >= GetCount.



Ah, ok... I wouldn't ever use it like that, it's the easy way of producing bugs.... Much better an explicit Realloc() or something like that. BTW resizing the array makes the assumption that elements have a default constructor, too.

Quote:


IMO/IME, shared ownership is the root of evil Smile At least in C++.



well, if you share ownership (like I've suggested) you MUST avoid any kind of pointers, but if it's well done can be rock solid.
Of course, if you use reference counted stuffs and than you take address of if, you can be sure about having bugs Smile

I must say that reference counted stuffs are usually small in size, so you can pass them by value with few overhead.
I did something like that some time ago and it was nice to use.

Ciao

Max
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "init" files in packages...
Next Topic: ProgessIndicator::SetColor
Goto Forum:
  


Current Time: Wed May 08 09:28:01 CEST 2024

Total time taken to generate the page: 0.02266 seconds