Re: UT_UCS2String problems


Subject: Re: UT_UCS2String problems
From: Dom Lachowicz (dominicl@seas.upenn.edu)
Date: Fri Jun 01 2001 - 14:48:42 CDT


> "memcpy(m_psz + nLen, sz, n);" should be
> "memcpy(m_psz + nLen, sz, n * sizeof(char_type));"

D'oh! Please fix this.
 
> P.S.: I've seen XAP_AbiObject right now, and I think
> that we should (at least) discuss if we should use
> this kind of aproach to solve the multiref'd objects
> problem, of if we should try to solve it with some
> kind of smart pointer (I'm too busy to discuss it this
> week, but I'm sure that others may start the
> discussion :)

Sure. I'd love to use an auto_ptr or something like that. Please propose
something because I'd love to use it instead of manual ref-counting and such.
Some sample code or something would be great. We need to at least:

1) Handle multi-referenced objects properly
2) Assert ownership of a pointer

Most of this is really important with regard to our storage containers
(UT_Vector, UT_Map) where we might want to ref either/both a key and a value.

Dom



This archive was generated by hypermail 2b25 : Fri Jun 01 2001 - 17:24:05 CDT