Re: object freeing kinda figured out

GWRepCami@aol.com
Sat, 4 Jan 1997 18:44:48 -0500

In a message dated 97-01-04 13:14:58 EST, you write:

> 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?

It states in the Objects book, GenClass MSG_GEN_REPLACE_VIS_MONIKER, that if
more than one object shares the overwritten block, the other object should be
updated with MSG_GEN_USE_VIS_MONIKER. However, the original is now
overwritten, so if the other object references it, it will now have the new
one to reference

There is nothing preventing you from also using MSG_GEN_REPLACE_VIS_MONIKER
to also change the other objects reference if you've got them both using the
same moniker, or if you've actually written it to both objects visMoniker
areas.

Lee