Re: string pointer

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello ©koda,

>does allocate_string("string") copy string or does it just return pointer
>to sequence and is because of that fast?

It returns a memory address of the first character in memory ('s').
It DOES "copy" the string and poke it to memory I think but if you
pass it a literal (like your example) the original sequence is
freed from memory as soon as allocate_string () returns.

Lewis Townsend
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu