can I "dispose" of an array?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • leegold2

    can I "dispose" of an array?

    Is there a way I can "dispose" of an array. For example I need to use an
    array for short time in a script. After I've used that data structure I
    want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.
  • Tony Marston

    #2
    Re: can I "dispose&q uot; of an array?


    "leegold2" <leegold@nospam .net> wrote in message
    news:LlGmd.6612 $GV5.1543@trndd c04...[color=blue]
    > Is there a way I can "dispose" of an array. For example I need to use an
    > array for short time in a script. After I've used that data structure I
    > want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.[/color]

    unset($array);

    --
    Tony Marston

    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




    Comment

    • Pedro Graca

      #3
      Re: can I &quot;dispose&q uot; of an array?

      leegold2 wrote:[color=blue]
      > Is there a way I can "dispose" of an array. For example I need to use an
      > array for short time in a script. After I've used that data structure I
      > want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.[/color]


      --
      Mail sent to my "From:" address is publicly readable at http://www.dodgeit.com/
      == ** ## !! !! ## ** ==
      TEXT-ONLY mail to the complete "Reply-To:" address ("My Name" <my@address>) may
      bypass the spam filter. I will answer all pertinent mails from a valid address.

      Comment

      • Kre¹o Kunjas

        #4
        Re: can I &quot;dispose&q uot; of an array?

        On Wed, 17 Nov 2004 11:11:39 GMT, leegold2 wrote:
        [color=blue]
        > Is there a way I can "dispose" of an array. For example I need to use an
        > array for short time in a script. After I've used that data structure I
        > want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.[/color]

        try unset($arraynam e);

        Comment

        • Kre¹o Kunjas

          #5
          Re: can I &quot;dispose&q uot; of an array?

          On Wed, 17 Nov 2004 11:11:39 GMT, leegold2 wrote:
          [color=blue]
          > Is there a way I can "dispose" of an array. For example I need to use an
          > array for short time in a script. After I've used that data structure I
          > want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.[/color]

          try:

          unset($array_na me);

          it says in manual that unset destroys variable, so i presume that also
          frees all resources that it used

          Comment

          • leegold2

            #6
            Re: can I &quot;dispose&q uot; of an array?

            leegold2 wrote:[color=blue]
            > Is there a way I can "dispose" of an array. For example I need to use an
            > array for short time in a script. After I've used that data structure I
            > want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.[/color]

            Thank you!

            Comment

            • Coder Droid

              #7
              Re: can I &quot;dispose&q uot; of an array?

              > > Is there a way I can "dispose" of an array. [snip][color=blue]
              >
              > try unset($arraynam e);[/color]

              Does that get rid of everything in the array immediately? Or does PHP
              have some sort of garbage collection? Or do things just hang out until
              the script ends? (Or maybe a combination of all these?)

              Did I use enough question marks?

              --cd


              Comment

              Working...