Many thanks to all those who responded to my GWorld question. It will take
some time to digest all of Jonathan's comments (many thanks for all the
details), but I appreciate everyones input. Here is a few comments about
the comments.
Bill Replied:
>Nope! Try "portRec;8 = @wndRec" - as is, you're only setting the first
>part of portRec.
Both portRec and wndRec were 8 byte records defined in the .Glbl file, so
there should be no problem with portRec = wndRec. After all, that is one of
the uses of records, to copy a whole lot of info with a simple equating of
the record variables. Jay I think was right on this issue.
Bill (and others) also replied:
Huh???? Did you _dispose_ of the PICT resource you create in gCurPICT&
each time? What on earth do you use it for, anyway? I can't imagine any
situation where I'd need _both_ a gWorld copy of a picture _and_ a PICT
recording of it! Especially if the PICT is just a "capture" of the bitmap
as it's coming in to the screen...
No I didn't. That was the cause of the memory problem. I have used the
program for months that way and never had a problem. Don't know why. I
just forgot about the need to dispose of the PICT resource before making
another. But now after adding the KILL PICTURE statement just prior to the
new PICTURE statement, the program worked fine for an extended period of
time (i.e., the memory problem is probably solved), except for one remaining
strange problem. Soon after I start making and rotating the "clusters" the
scroll bar region of the output window gets garbaged up (drawn with
fragments of earlier "clusters", presumably from copying back from the
GWorld. The heap memory problem seems to be gone.
Question:
Since the scroll bar region is an add on to the rectangle defining the
output window, when the GWorld is copied back to the screen is there also a
"GWorld scroll bar region" that is also copied back?, and if so, why is that
region getting junk drawn into it when the GWorld and output retangles are
the same? I would have thought that the GWorld rectangle doesn't have a
scroll bar region and then when coping back with copibits, the scroll bar
region of my regular output window shouldn't be effected. But it does get
effected! Does the scroll bare region of the GWorld (if it exists) need to
be "cleared" too. This is rather confusing to me.
I think I agree with Bill, Jay, and Jonathan about redundancy. I will get
rid of the PICTURE and just do the copybits when I need an update. Maybe
that will make the scroll bar problem go away. But I would like to know
what is causing the problem.
Eric
Argonne National Lab
Argonne IL 60439