Loading ...
Sorry, an error occurred while loading the content.
 

When to use MetabaseFreeResult?

Expand Messages
  • dweingart@pobox.com
    What guidelines should I be following with regards to using MetabaseFreeResult? Should I use it every time I perform a query, or just for queries that return a
    Message 1 of 4 , Aug 8, 2001
      What guidelines should I be following with regards to using
      MetabaseFreeResult?

      Should I use it every time I perform a query, or just for queries that
      return a result set?

      Thanks!

      -dave
    • mlemos@acm.org
      Hello, ... that ... You don´t have to free the result set explicitly but if you don´t free it for result sets with many rows, you will be taking a lot of
      Message 2 of 4 , Aug 8, 2001
        Hello,

        --- In metabase-dev@y..., dweingart@p... wrote:
        > What guidelines should I be following with regards to using
        > MetabaseFreeResult?
        >
        > Should I use it every time I perform a query, or just for queries
        that
        > return a result set?

        You don´t have to free the result set explicitly but if you don´t
        free it for result sets with many rows, you will be taking a lot of
        memory.

        Regards,
        Manuel Lemos
      • dweingart@pobox.com
        ... Ok. So I don t need to explicitly call MetabaseFreeResult if the query doesn t return rows, or if it only returns a few. Thanks for your help! -dave
        Message 3 of 4 , Aug 8, 2001
          --- In metabase-dev@y..., mlemos@a... wrote:

          > You don´t have to free the result set explicitly but if you don´t
          > free it for result sets with many rows, you will be taking a lot of
          > memory.

          Ok. So I don't need to explicitly call MetabaseFreeResult if the query
          doesn't return rows, or if it only returns a few.

          Thanks for your help!

          -dave
        • mlemos@acm.org
          Hello, ... of ... query ... You can´t free a result of a query that does not return rows. I think you should always free a result that return rows although
          Message 4 of 4 , Aug 8, 2001
            Hello,

            --- In metabase-dev@y..., dweingart@p... wrote:
            > --- In metabase-dev@y..., mlemos@a... wrote:
            >
            > > You don´t have to free the result set explicitly but if you don´t
            > > free it for result sets with many rows, you will be taking a lot
            of
            > > memory.
            >
            > Ok. So I don't need to explicitly call MetabaseFreeResult if the
            query
            > doesn't return rows, or if it only returns a few.

            You can´t free a result of a query that does not return rows. I think
            you should always free a result that return rows although PHP will
            free the resources by the end of the script.

            Regards,
            Manuel Lemos
          Your message has been successfully submitted and would be delivered to recipients shortly.