-
Mar 22nd, 2025, 09:18 AM
#1
Thread Starter
Lively Member
[RESOLVED] Static/Dynamic Arrays
Can I use the Static statement to dimension a locally global dynamic array in an ordinary module whose values are retained until I specifically re-dimension?
I need to keep some large arrays memory resident for processing between calls to various functions both internal and external to the module. I also make calls to memory and processing hungry external programs so I need to keep my memory use reasonable.
-
Mar 22nd, 2025, 01:14 PM
#2
Re: Static/Dynamic Arrays
Not quite following but yes if you declare it as Static the dimensions and contents will still be there on the next call to that function.
Sounds more like you want a Public variable though, if it needs to be accessed by more than one function.
-
Mar 22nd, 2025, 02:27 PM
#3
Thread Starter
Lively Member
Re: Static/Dynamic Arrays
Yes. Thanks
I recall now that doing this requires fully public variables. Of course I got a runtime error until I made them global.
Ordinarily even my largest project have less than a half-dozen global variables and UDTs.
This one will have a few more as I need put a very large CSV files corresponding to a .MIDI files with running times exceeding an hour on a few occasions. The .MIDI file is also held in memory. Am adapting .MIDI files to operate a modern player piano with accompaniment.
After investigating memory usage I discovered two things: 1) My memory use can be kept nearly inconsequential at most times and 2) My new Nitro 17 with its base 16 gig memory is inadequate as Chrome has turned into a memory hog or insane proportion with nearly 1.2 gig of memory reserved for GPU functions and only a single tab open. All combined, Chrome alone is eating up nearly half the memory. At least opening a couple additional tabs doesn't affect memory usage too badly but this is so ridiculous I'm about to look for a MUCH lighter weight browser.
Last edited by SwampeastMike; Mar 23rd, 2025 at 09:42 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|