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 » U++ Library support » U++ Core » T* Detach() for ArrayMap
Re: T* Detach() for ArrayMap [message #24883 is a reply to message #24881] Wed, 03 February 2010 06:57 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
you're absolutely right, this one's better. Smile should have looked before..

the goal was just to be able to switch from Array to ArrayMap, when i.e one gets the impression, well i need to speed up things, or need to change stuff, so just to enhance it in one place, and supply the keys in the other places, without the need of doing lot of workarounds to replace missing behaviour.

Detach() slowness was not the main goal in that, though having it done faster is precious. one should at least be able to separate an obejct from a ArrayMap again (which maybe were constructed outside the map and added).

this kind of aproach is not possible for Vector and VectorMap though, the objects are stored on a consequtive mem space, which can only be Removed(). but Vector/VectorMap requires to have a Mouvable object (objects are reorganized on storage space during growth/shrink of vector), so why not having same Detach() also here? which would simply copy the stored object to a decent new place and return pointer? maybe because its no real "detach".. but it would make life esier, when exchanging vector to array, array to map or waht ever. dont know for sure if it makes sense.

DetachUnlink also makes sense, to say simply "stay in background until reactivated..".. but how would you reactivate such one?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: VC2010
Next Topic: Symlink/Shortcut support
Goto Forum:
  


Current Time: Fri May 02 14:07:11 CEST 2025

Total time taken to generate the page: 0.02163 seconds