Re: g_string question



On Wed, 2003-02-19 at 19:58, Ronald Roth wrote:
Hello,

      I have a call in program to g_string_new_new(strptr, len).  My question
is:  Does this create a new GString and then copy len bytes from strptr,
or does it just create a new GString struct an assign the "str" pointer
to point to strptr?  If it is the former, is there some way to do the
latter?  I am dealing with rather large strings in my program, and I
believe that my program might be experiencing a significant slowdown
because of all the copying that may be occuring.

It copies. GString always makes a copy of the data.

Regards,
                                        Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]