Re: object freeing kinda figured out

Edward Di Geronimo Jr. (edwdig@bergen.org)
Sat, 4 Jan 1997 13:10:31 -0500

>True, that the object stores space for a chunkHandle, but that visMoniker can
>come from any one of several sources. Now, your list, is a different matter.
> Because you're using a GenItemGroup, I presume, that has to be updated
>seperately from the actual object's visMoniker...and for that....of the
>messages that are available to you, it appears that you need to use
>MSG_GEN_REPLACE_VIS_MONIKER, and not one of the variants.
> MSG_GEN_USE_VIS_MONIKER allows you to "reference" another visual moniker, it
>does not "overwrite" it, like the MSG_GEN_REPLACE_VIS_MONIKER message does.
> That is the one you will want to use to accomplish what I hear you saying
>you want to do. You're just using the simpler messages..and getting simpler
>temporary fixes to the problem.

You've got me confused now. If I have a string of text in a GenText object,
and I want it to become the new moniker, I have to use
msg_gen_replace_vis_moniker_text. For the item group, when you pick a
different object, I send the item you selected MSG_GEN_GET_VIS_MONIKER, and
send the result to the item group in MSG_GEN_USE_VIS_MONIKER. None of these
messages are supposed to free the old moniker. I always have at least 2
objects sharing the moniker, the object you create and the item for it. When
the object is selected the item group also shares it. I send one object
MSG_GEN_REPLACE_VIS_MONIKER_TEXT, then I send it MSG_GEN_GET_VIS_MONIKER,
and send the other two MSG_GEN_USE_VIS_MONIKER. From what the include files
say, the old moniker stays in memory. I want to free it. How?

------------------------------------------------------------------------
| I've always been afraid to die, but I think I'm more afraid to live. |
| -Billy Corgan, Smashing Pumpkins, The Aeroplane Flys High |
------------------------------------------------------------------------
| Edward Di Geronimo Jr. edwdig@bergen.org |
------------------------------------------------------------------------