Hi Bruce,
all okay so far wilth com using ref counting
(comPlugin0.73_100401_2RefCounting.zip in my usual folder
http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/)
Some questions:
for each objFile in objFolder.Files
win.debug(" unicode handle: " ++ objFile.Name ++ " = " ++
objFile.Name.ascii) ;; should be returned as handle to unicode string
; NOT necessary to release objects
; objFile.release
endfor
Seem to work okay without release. hanlde always the same, which suggests the
for/each mechanism is doing the right thing. I'll step through it in debugger
at some point to make sure.
My decrementRef callback function, it it's passed an invalid handle, does
nothing. That seems right, because might happen if e.g. user
DID release a handle explicitly before your code (e.g. for/each code) tried to.
That sounds right.
Also: if I do this:
hVec[1] = hanToComObj
I assume your code bumps up the ref count via my incrementing callback. But if
I do something like that in my code within some plugin, I'd better bump up the
ref code myself? Suppose I do it via the VECSERVICES interface, which calls
your code in vec.c. Don't see anything in there examining assigned values for
handlish nature.
I pet ppsv->CallPlugin doesn't do anything about it either. Assume your code
handling assignment is where it happens, and I have to do the same anywhere I
copy a handle
Hmmm, what it I use ppsv->SetVar or the SetVar that comes down through service
parameters; does that do reference incrementing?
Does it check to see if variable I'm setting already has a handle in it, and
decrement if so?