> Um, maybe not?  Since my code would go
> 
>   pVecServices->create_vet(....,pszNewVecHanBuff);
> //got new vec now
> //later; put a com handle in iNdx'th eelement of vector
>   pVecServices->set_vec(pszNewVecHanBuff, iNdx, 
>            pszNewCommHanBuff);
> 
> In this case I can absolutely guarantee that vector element iNdx had nothing 
> in it before I called pVecServices->set_vec, since vec is clean shiny new.  
> If I understand ppsv->changerefhandle, now no chance I'm overwritting 
> something that needed ref counting.


It was not the element of the vector, it was the handle to the vector itself I 
was thinking about.  If you assign it to a plain variable using setvar, then no 
issue, powerpro.exe handles.  But if you store the result in an object, then in 
theory you should call changerefhandle on it.   Of course, since vec is not 
reference counted, it does not really matter.

If vec was referenced counted, you could not have to worry about local copy and 
you could do stuff like this, fwiw:

function ...
local myvec=vec.create (...
global noGoodReason = myvec
quit

Without ref counting, the vector gets freed when local myvec is released, even 
though global still is using it.  Not sure if something analogous could ever 
happen in your code (if vec is ever made to use ref counting).
>


Reply via email to