Professional Web Applications Themes

memory management questions - Macromedia Director Lingo

Hello Wondering what's the best way to manage memory. I'm just not able to figure out how my application will run on a pc with 64MB of ram since I'm working with 1GB. When I play my movie I'm getting close to 128MB, too much to what I guess. So I placed the following code at the begining of every marker I have: on prepareFrame me unload end prepareFrame me I am wondering how would that affect the play back of my movie when distributed to a less sophisticated PC, and I'm thinking if there would be a way to ...

  1. #1

    Default memory management questions

    Hello
    Wondering what's the best way to manage memory. I'm just not able to figure out how my application will run on a pc with 64MB of ram since I'm working with 1GB. When I play my movie I'm getting close to 128MB, too much to what I guess. So I placed the following code at the begining of every marker I have:

    on prepareFrame me
    unload
    end prepareFrame me

    I am wondering how would that affect the play back of my movie when distributed to a less sophisticated PC, and I'm thinking if there would be a way to purge my memory everytime I load a certain amount of RAM like for example everytime my movie get to 64MB of RAM, it unloads the memory. Do you know of an easy way or a way to do it. Your help or feedback would be appreciated.

    Thank you for your reply.


    multimediacrazy webforumsuser@macromedia.com Guest

  2. #2

    Default Re: memory management questions

    Hi,

    You can set the priority of every cast member thru lingo and then give a global purge priority setting that Director will use to manage cast members. Director is set to Normal....priority by default that allows Director to take control when to load and unload cast members... you can pverride this setting... check the purge priority in the help.

    You can also use ramNeeded() to determine the number of bytes of memory required to display a range of frames and divide the result by 1024 to convert the number of bytes to kilobytes.

    Use the freeBytes() or freeBlock() function to determine the current amount of available memory



    Vj
    vij010 Guest

  3. #3

    Default Re: memory management questions

    Alternatively :
    You could use baMemoryInfo("free ram"), a function of BuddyAPI.
    You take it for reference on a prepareMovie script at launching, and then
    each time you enter a prepareFrame, you can test it.
    For what I have noticed, unload is not cleaning everything. You may be
    better off with unloadmember, with a repeat to cover all casts member. Be
    sure to use only existing cast members in the unloadmember...

    Also, you should test for real on a 64MB RAM machine... If you have sounds,
    this is going to be instructive...

    Good luck
    Christophe


    "multimediacrazy" <webforumsusermacromedia.com> a écrit dans le message de
    news: bevd1n$3fc$1forums.macromedia.com...
    > Hello
    > Wondering what's the best way to manage memory. I'm just not able to
    figure out how my application will run on a pc with 64MB of ram since I'm
    working with 1GB. When I play my movie I'm getting close to 128MB, too much
    to what I guess. So I placed the following code at the begining of every
    marker I have:
    >
    > on prepareFrame me
    > unload
    > end prepareFrame me
    >
    > I am wondering how would that affect the play back of my movie when
    distributed to a less sophisticated PC, and I'm thinking if there would be a
    way to purge my memory everytime I load a certain amount of RAM like for
    example everytime my movie get to 64MB of RAM, it unloads the memory. Do you
    know of an easy way or a way to do it. Your help or feedback would be
    appreciated.
    >
    > Thank you for your reply.
    >
    >

    Christophe Guest

Similar Threads

  1. memory management
    By Rastermaster in forum Macromedia Director 3D
    Replies: 2
    Last Post: March 22nd, 10:20 PM
  2. Large memory control questions
    By Justin Weinberg in forum ASP.NET Building Controls
    Replies: 1
    Last Post: January 23rd, 01:21 PM
  3. Preload, memory management and calling other movies
    By flashster in forum Macromedia Director Basics
    Replies: 2
    Last Post: December 12th, 01:42 PM
  4. Memory management on mac
    By toberttobert webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: October 18th, 03:52 PM
  5. perl memory management - does array = () free the memory?
    By Matt Oefinger in forum Perl / CGI
    Replies: 0
    Last Post: June 25th, 09:11 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139