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 » Ptr improve
Re: Ptr improve [message #32488 is a reply to message #32487] Fri, 20 May 2011 14:43 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i totally agree with you, thinking the shared or semi-GC way to the end, if it's implemented halfway (like this would be in this case) would bring one in serious trouble sooner or later. you end up breaking your head on how to prevent this damn thing from beeing destroyed. and u keep a Shared<T> instance around to do just that. and you could keep the whole instance just as well.

if at all used, it needs to be veeery consequent. so if one decides to handle an object in shared way, it needs to go completely like that. no mixes of API's (half is using Shared<T> and half T*)..
and it makes trouble when handling a polymorph type, here you want a Shared<Base>, there a Shared<Derived> and they'd need to have the same ref (which i adressed as well, but it's not posted yet)

nevertheless, as a helper, i will put it in my Gen package, as a matter of discussion, just in case one happens to need it some time again. is that ok?

[Updated on: Fri, 20 May 2011 14:45]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FIX: UPP::Scan returns int64 for INT_V
Next Topic: GetCurrentDirectory() Doesn't contain the \ is this a bug?
Goto Forum:
  


Current Time: Fri Aug 22 06:16:47 CEST 2025

Total time taken to generate the page: 0.05995 seconds