Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

How to release memory ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to release memory ?

    Some good news, then a question.

    Good news: I had almost given up on my app which I use to keep track of my small business - frequent crashes etc. Then I discovered (from this forum) a5_forceclosetables(). I put this command into the OnActivate event for the app's Main Menu, and hey presto - no more crashes.

    Question: using Windows Task Manager to look at memory usage:
    • If I open my app, with just the main menu open, the memory usage is around 13,000k.
    • If I open (and then close) several forms, reports etc, coming back to just the main menu, the memory usage builds up typically to about 45,000k, and stays there, until ...
    • ... I minimise Alpha5, then restore it, at which point the memory usage instantly drops back to around 13,000k.

    Though it's no great hassle to minimise & restore the app, I thought it would be nice to release this memory via code. Any ideas on whether this can be done ? (I'm using XP Home, in case this is relevant.)

    #2
    Re: How to release memory ?

    Originally posted by Bonbon View Post
    I thought it would be nice to release this memory via code. Any ideas on whether this can be done ?
    You thought right:
    <OBJECT>.MINIMIZE()
    <OBJECT>.MAXIMIZE()

    Comment


      #3
      Re: How to release memory ?

      Thanks for responding. I didn't word my question that well - I was actually hoping for a command to release the memory, without minimizing & restoring (and the accompanying bouncing down & up of the display).

      However, I did try a5.minimize() followed by a5.restore(), and although these do what they say on the tin, unlike a "manual" minimize & restore, they don't seem to release memory anyway.

      Comment


        #4
        Re: How to release memory ?

        In reality, the only way to release memory is to restart Windows, or, less efficiently, terminate the program from the Task Manger.
        I am not sure if I want to fool with any API manipulating the Task Manger though.
        How about just another RAM? They are pretty cheap.

        Comment


          #5
          Re: How to release memory ?

          If a5_forceclosetables() is doing something then you have some other problem in your application, specifically it seems you are opening tables without closing them. This is not difficult to check and fix. For every table.open() there must be a table.close() and also note that some operations will not close tables properly.
          Using a5_forceclosetables() is not a really a satisfactory workaround IMHO.

          Comment


            #6
            Re: How to release memory ?

            Originally posted by Garry Flanigan View Post
            If a5_forceclosetables() is doing something then you have some other problem in your application, specifically it seems you are opening tables without closing them. This is not difficult to check and fix. For every table.open() there must be a table.close() and also note that some operations will not close tables properly.
            Using a5_forceclosetables() is not a really a satisfactory workaround IMHO.
            While I would agree with you in principal, I'm not sure I can agree completely. I have an app that I have studied many times, over many years, and it is still giving me fits with strange errors and crashes. I'm willing to look at anything that might help - including magic, voodoo, witchcraft, tarot cards, etc.

            I've already created my own "AIMS_Check_4_close()" function that looks for all Table.Open() commands and reports all matching Table.Close() commands just to help make sure I've closed everything. (sample printout attached) If no matching "close" is found, a note in all caps is displayed. It can also check for accidentally trying to "close" a Table.Get(). (Gary - This function is in the latest AIMS App Analyzer if you've installed the update. Go to the Interactive Window and just type the function name. I forgot to include a link to it somewhere in the main application but it should be there in the next version.)

            I'm sure I've closed every table in my app and I'm still getting those weird errors. I tried reducing the complexity of one of my sets but that hasn't solved the problem and I can't be sure whether it has helped at all or not.

            I will be checking out the A5_forceclosetables() idea but if it requires a manual "minimize" and "restore" then it's really not a viable solution for a generic application.

            (The sample printout was from the original run of the app mentioned above. The four "Close not found" messages were all related to custom scripts that were only used by me for special situations. They were not available to normal users - but they were fixed anyway.)

            Comment


              #7
              Re: How to release memory ?

              Mem Turbo is a handy little utility that can recover memory. I have used it in the past and it has since been improved.

              Mem Turbo4
              Robin

              Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

              Comment


                #8
                Re: How to release memory ?

                Although MemTurbo probably has many more features, I have successfully used the freeware "Cacheman" in prior years for a program that would not release memory.
                Mike
                __________________________________________
                It is only when we forget all our learning that we begin to know.
                It's not what you look at that matters, it's what you see.
                Henry David Thoreau
                __________________________________________



                Comment


                  #9
                  Re: How to release memory ?

                  http://www.whatsrunning.net/
                  This is the free tool I use to see whats happening.
                  See our Hybrid Option here;
                  https://hybridapps.example-software.com/


                  Apologies to anyone I haven't managed to upset yet.
                  You are held in a queue and I will get to you soon.

                  Comment


                    #10
                    Re: How to release memory ?

                    Mike and Robin, did using those memory cleaners fix any "weird" A5 problems?

                    By "weird" I mean things that work just fine for awhile then eventually start generating strange errors that go away just by restarting A5.

                    Comment


                      #11
                      Re: How to release memory ?

                      I have not had memory problems (at least not that affected Alpha) and so have not had to use the memory manager (Cacheman) since I got rid of that program that necessitated its use.,,,,so no help here am afraid.

                      In your case Cal, why not try one and see. You can adjust the amount of memory recovered and the low point of memory amount you want to trigger it automatically.

                      There were warnings in the settings, if memory serves, that to be careful as to not recover too much as it could adversely affect other programs....but never had an issue recovering the maximum amount ever.
                      Mike
                      __________________________________________
                      It is only when we forget all our learning that we begin to know.
                      It's not what you look at that matters, it's what you see.
                      Henry David Thoreau
                      __________________________________________



                      Comment


                        #12
                        Re: How to release memory ?

                        Re: "why not try one and see."

                        I'm actually already set up to try one. This is a generic app so I don't really want to deal with any setup. I'd also prefer not to make my customers purchase another program just to make mine work. I'm planning to run Microsoft's ClearMem.exe once every 1/2 hour or so and see if that helps.

                        I can safely says that there are no problems when running it on my system. (I wanted to try that for awhile before putting it on a customer's system - just in case.) Unfortunately, that only tells me that ClearMem isn't causing trouble because I haven't been able to recreate the problems at all on my system. They only occur after working with the program for awhile. Even entering or closing one order after another for 1/2 hour (which I did for testing) doesn't seem to create the problems. Only random usage throughout the day seems to cause the issues.

                        The next step is to put it on one of the customer's systems.

                        Comment


                          #13
                          Re: How to release memory ?

                          Originally posted by Bonbon View Post
                          [*]If I open my app, with just the main menu open, the memory usage is around 13,000k.[*]If I open (and then close) several forms, reports etc, coming back to just the main menu, the memory usage builds up typically to about 45,000k, and stays there, until ...[*]... I minimise Alpha5, then restore it, at which point the memory usage instantly drops back to around 13,000k.
                          Pete, if it will help in any way, I'd be happy to see if the same thing happens on my machine. If you want, remove any sensitive data annd ping me a Private Message. The Open and Close is obviously not working as you expect.
                          See our Hybrid Option here;
                          https://hybridapps.example-software.com/


                          Apologies to anyone I haven't managed to upset yet.
                          You are held in a queue and I will get to you soon.

                          Comment

                          Working...
                          X