Re: Win98 resources
From: Novice (NEW_at_aol.com)
Date: 05/10/04
- Next message: Duane Bozarth: "Re: How to set up Pre-Logon executable?"
- Previous message: Jim Carlock: "Re: merge multiple databases"
- In reply to: Don_at_home.com: "Re: Win98 resources"
- Next in thread: Duane Bozarth: "Re: Win98 resources"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 15:47:35 -0400
It appears I may be wrong base on a number of tests that I performed
because of both of your help
First you program did produce the same results that you got
I then physically pasted 500 rectangles into a form and again minimal
memory changes. (although while I was pasting the memory did drop but
it came back)
Finally I took the form that had the problem stripped out all the code
and put it in a new project and guess what - minimal memory changes
So it appear that I have a "memory leak" somewhere within the program.
I guess the next step it to create break points to try an isolate the
memory leak unless any of you have an idea?
BTW Thanks for all your help because I was obviously barking up the
wrong tree
Mon, 10 May 2004 19:11:59 GMT, Don@home.com wrote:
>Nothing to it...
>Start a new project
>Add a Shape Control to the form and set its Index to Zero...
>Copy/Paste and run the following:::
>
>'********* Start Code *******
>Option Explicit
>
>Private Sub Form_Click()
>Dim lLp As Long
>For lLp = 1 To 20000 'Or what ever
> Load Shape1(lLp)
> Shape1(lLp).Visible = True
> If lLp Mod 100 = 0 Then Me.Caption = "Loaded: " & CStr(lLp)
> 'Note: You'll notice a slow down in the caption changes
> ' as more and more shapes are loaded. This is due
> ' to memory re-allocation I would believe...
>Next lLp
>End Sub
>
>Private Sub Form_Load()
>
>End Sub
>'********* End Code **********
>On Mon, 10 May 2004 14:47:44 -0400, Novice <NEW@aol.com> wrote:
>
>>Very interesting I have a major impact. If the code is simple could
>>you post it?
>>
>>
>>On Mon, 10 May 2004 13:54:31 GMT, Don@home.com wrote:
>>
>>>I'm running Winders 98 and I just tried, just for grins, a little project that
>>>added Shape Controls (array) to a form and monitored the impacted on the System,
>>>GDI and User Resources...
>>>After 30,000+ were added and NO Change in any resource was noticed I quit the
>>>app...
>>>Come to think of it the only time I have run into a memory problem (under normal
>>>operation) is when I tried to work with HUGH Images...
>>>
>>>On Mon, 10 May 2004 08:08:13 -0500, Duane Bozarth <dp_bozarth@swko.dot.net>
>>>wrote:
>>>
>>>>Novice wrote:
>>>>>
>>>>> So Basically a thick short line will take up less memory then a
>>>>> triangle of the same size?
>>>>
>>>>No, I think it's the resources of the objects that's the problem and you
>>>>would be replacing the 250+ objects with code to do the drawing. As for
>>>>the geometry, read the Line method--it will draw retangles as well as a
>>>>simple line and include fill or not, as desired...
>>>>
>>>>> Is there a way to calculate the amount of difference. IS there a
>>>>> formula that says a rectangle takes up 48 bytes and a line only 16?
>>>>>
>>>>> If there is it may pay to recode since it is not that hard M ost of
>>>>> the drawing is done in a loop
>>>>>
>>>>> So is there a URL or formula to determine memory load of object with
>>>>> Win98?
>>>>
>>>>Don't think so--but Line will cut the number of objects down
>>>>significantly replacing them with executable code---you could make a
>>>>small sample program just making the form with as many rectangles as you
>>>>want---I don't think you would have any resource problems that way with
>>>>thousands of squares/rectangles...
>>>
>>>Have a good day...
>>>
>>>Don
>
>Have a good day...
>
>Don
- Next message: Duane Bozarth: "Re: How to set up Pre-Logon executable?"
- Previous message: Jim Carlock: "Re: merge multiple databases"
- In reply to: Don_at_home.com: "Re: Win98 resources"
- Next in thread: Duane Bozarth: "Re: Win98 resources"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|