+ Reply to Thread
Results 1 to 8 of 8

memory stack confusion (leftovers) when running tests in VBA project

  1. #1
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    memory stack confusion (leftovers) when running tests in VBA project

    can anybody here tell me how they run tests on their automation distributables? this question is related to the 2 I've asked recently. same project. I have a very small routine, and I'm writing a few different methods to test speed. I will use one of them, however, in order to preserve my sanity and brain power, I always run an app multiple times when it is partially finished so I can see how the coding environment handles all of the transaction requests I am writing within the code. how do you guys do this? because what I've noticed this time around is that if I run a test and break lines in any given area, some of memory that is not destroyed causes all sorts of confusion (which seems to not be patternized or predictable) when re-running the same test on the same app multiple times. what is the solution to this? obviously I don't want to write a bunch of temp code to destroy memory at various points in an app if I want to run in part way though a million times. that would be a very big waste of time.

    how do you guys go about this?

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: memory stack confusion (leftovers) when running tests in VBA project

    You can't really control memory allocation per se. You can set variables to Nothing but all that will do is decrement the reference counter; there is no guarantee as to when the actual garbage collection will occur.
    Remember what the dormouse said
    Feed your head

  3. #3
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: memory stack confusion (leftovers) when running tests in VBA project

    So given what you, as a professional of excel applications, have said, what that leaves me with is essentially no answer to the problem is that correct? I mean there is a solution to the problem that I have found and that is to simply close the Excel application and every workbook that's opened when I'm testing obviously when I do that garbage collection has to occur because they sell quits and if any program quits then everything is destroyed by default

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: memory stack confusion (leftovers) when running tests in VBA project

    I have no idea what a 'professional of Excel applications' might be, but basically yes. Simply restarting excel is the simplest and cleanest method.

  5. #5
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: memory stack confusion (leftovers) when running tests in VBA project

    Do you know if that's the process people go through and running software applications in any other ide's? I don't know if you have used any other tools but I use many of them including visual studio, visual studio code, eclipse for Java PHP and JavaScript, aptana studio, dreamweaver, PHP storm, pycharm for python, etc....

    But all of those development environments are much more sophisticated than office programs and I don't have time to learn everything I just wanted your input as to if it's easy to do this sort of reset process using sophisticated environments like I've just mentioned? Thanks

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: memory stack confusion (leftovers) when running tests in VBA project

    The reason I just said what I said is because restarting an office application to get rid of all memory junk that's temporarily stored in the system is a really bad way to force a developer to do that job. Any other web environment probably has a built-in method you don't have to restart

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: memory stack confusion (leftovers) when running tests in VBA project

    The VBE is decades old and has had little to no development, since VBA is not in the MS roadmap for the future. It's a remarkably stupid decision, IMO, but there we are.

  8. #8
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: memory stack confusion (leftovers) when running tests in VBA project

    well yes, I think there's universal agreement on that one.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] stack memory error
    By COURTTROOPER in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-26-2018, 03:28 PM
  2. [SOLVED] Thrashing VBA Memory Leaks. Memory Loop Problems. Uncleared Memory in .Match Range Object
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2017, 05:17 PM
  3. [SOLVED] Error message 'Running out of stack space'
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2017, 09:10 PM
  4. Running SQL exhausts PC's memory
    By Ron1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2008, 04:44 PM
  5. [SOLVED] Average a group of tests for grade, some tests not taken by all.
    By Scafidel in forum Excel General
    Replies: 4
    Last Post: 08-18-2005, 11:05 PM
  6. Not Enough Memory - While Running a Macro
    By Jasper in forum Excel General
    Replies: 0
    Last Post: 04-18-2005, 10:06 AM
  7. Having stack/heap memory in Excel VBA
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2005, 03:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1