Re: object freeing kinda figured out

GWRepCami@aol.com
Sat, 4 Jan 1997 02:10:51 -0500

In a message dated 97-01-03 22:29:47 EST, edwdig@bergen.org (Edward Di
Geronimo Jr.) writes:

> Ok, what I mean is this:
>
> In Basic, when you change the moniker, it calls
> msg_gen_replace_vis_moniker_text. That leaves the old moniker in memory. I
> know that for a fact because both the item in the dropdown list and the
> object share the same moniker. When I change one the other doesn't change
> until I tell it to use the new moniker with msg_gen_use_vis_moniker, which
> doesn't free the old moniker. The instance data doesn't save space for a
> moniker, it saves space for a chunkhandle of a moniker. Also, when you
> delete an object, I simply use MSG_GEN_REMOVE_CHILD. It stays around. I
> couldn't get it to be freed. If if play around long enough you will bring
> the resource large enough for the system not to like it, and if you play
> around for a real long time it will grow over 64k. I want to avoid this.
>

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.

Lee