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 » Community » Newbie corner » broken pick semantics
Re: broken pick semantics [message #37821 is a reply to message #37817] Thu, 15 November 2012 04:16 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1792
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi crydev

Your problem with broken pick semantics is not actually on the line with GetCount(). That is just coincidentally the first place when you try to access picked container. You will have to look in the code that is executed before. Check for any copy/assignment of SyncDirectories to another Vector. Vector is by default using pick semantics, so when you copy it, the original content is destroyed.

Read the NTL tutorial, (especially section 3) for basic explanation of picking and also Transfer semantics and Pick behavior explanation for further details. It is some heavy reading, but necessary to understand the U++ containers. When I started to work with U++, I had to read it at least once a day for a week, before I got used to it and understood why is it so great Very Happy

Also if you post more of the related code, I should be able to point you more exactly to where the problem started. It is definitely not in the parts that you posted.

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Thread with parametarized callback?
Next Topic: dropdown submenu into ToolBar
Goto Forum:
  


Current Time: Sun Aug 24 23:48:27 CEST 2025

Total time taken to generate the page: 0.09840 seconds