www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - long string and memory

reply jicman <jicman_member pathlink.com> writes:
Greetings!

I have a program with a function downloads a bunch of xml as one huge string
(char[]) and splits that xml into pieces and return a char[][] array.  What
happens to that huge string after that function returns the array?

thanks,

josé
Feb 25 2005
parent reply Paul Bonser <misterpib gmail.com> writes:
jicman wrote:
 Greetings!
 
 I have a program with a function downloads a bunch of xml as one huge string
 (char[]) and splits that xml into pieces and return a char[][] array.  What
 happens to that huge string after that function returns the array?
 
 thanks,
 
 josé
 
 
If nothing outside the function references the long string, then it is garbage collected. -- -PIB -- "C++ also supports the notion of *friends*: cooperative classes that are permitted to see each other's private parts." - Grady Booch
Feb 25 2005
parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
Indeed, this is a good example of the type of program for which D will
be _the_ superlative language.

"Paul Bonser" <misterpib gmail.com> wrote in message
news:cvntpl$1cc2$1 digitaldaemon.com...
 jicman wrote:
 Greetings!

 I have a program with a function downloads a bunch of xml as one huge
 string
 (char[]) and splits that xml into pieces and return a char[][] array.
 What
 happens to that huge string after that function returns the array?

 thanks,

 josé
If nothing outside the function references the long string, then it is garbage collected. -- -PIB -- "C++ also supports the notion of *friends*: cooperative classes that are permitted to see each other's private parts." - Grady Booch
Feb 25 2005
next sibling parent reply Paul Bonser <misterpib gmail.com> writes:
Matthew wrote:
 Indeed, this is a good example of the type of program for which D will
 be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P -- -PIB -- "C++ also supports the notion of *friends*: cooperative classes that are permitted to see each other's private parts." - Grady Booch
Feb 25 2005
parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
"Paul Bonser" <misterpib gmail.com> wrote in message 
news:cvo141$1fjg$1 digitaldaemon.com...
 Matthew wrote:
 Indeed, this is a good example of the type of program for which D 
 will
 be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P
I do. And that's one of the mild ones! ;)
Feb 25 2005
next sibling parent Brad Anderson <brad dsource.dot.org> writes:
Ah, Matthew the sesquipedalian author.

BA

Matthew wrote:
 "Paul Bonser" <misterpib gmail.com> wrote in message 
 news:cvo141$1fjg$1 digitaldaemon.com...
 
Matthew wrote:

Indeed, this is a good example of the type of program for which D 
will
be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P
I do. And that's one of the mild ones! ;)
Feb 25 2005
prev sibling parent reply John Reimer <brk_6502 yahoo.com> writes:
Matthew wrote:
 "Paul Bonser" <misterpib gmail.com> wrote in message 
 news:cvo141$1fjg$1 digitaldaemon.com...
 
Matthew wrote:

Indeed, this is a good example of the type of program for which D 
will
be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P
I do. And that's one of the mild ones! ;)
Matthew likes big words. "Superlative" is indeed a mild one. I don't think it's always appropriate ;-), but it's good exercise for the brain; I know I'm frequently looking up words on the internet dictionary after reading his posts. He also likes using slang and colloquial language, the definitions for which I've sometimes never found! Quite the guy! :-) - John R.
Feb 25 2005
next sibling parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
Honk!

"John Reimer" <brk_6502 yahoo.com> wrote in message 
news:cvo4p8$1jcg$1 digitaldaemon.com...
 Matthew wrote:
 "Paul Bonser" <misterpib gmail.com> wrote in message 
 news:cvo141$1fjg$1 digitaldaemon.com...

Matthew wrote:

Indeed, this is a good example of the type of program for which D 
will
be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P
I do. And that's one of the mild ones! ;)
Matthew likes big words. "Superlative" is indeed a mild one. I don't think it's always appropriate ;-), but it's good exercise for the brain; I know I'm frequently looking up words on the internet dictionary after reading his posts. He also likes using slang and colloquial language, the definitions for which I've sometimes never found! Quite the guy! :-) - John R.
Feb 25 2005
parent reply John Reimer <brk_6502 yahoo.com> writes:
There!  See?  See?  Like that!

Matthew wrote:
 Honk!
 
 "John Reimer" <brk_6502 yahoo.com> wrote in message 
 news:cvo4p8$1jcg$1 digitaldaemon.com...
 
Matthew wrote:

"Paul Bonser" <misterpib gmail.com> wrote in message 
news:cvo141$1fjg$1 digitaldaemon.com...


Matthew wrote:


Indeed, this is a good example of the type of program for which D 
will
be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P
I do. And that's one of the mild ones! ;)
Matthew likes big words. "Superlative" is indeed a mild one. I don't think it's always appropriate ;-), but it's good exercise for the brain; I know I'm frequently looking up words on the internet dictionary after reading his posts. He also likes using slang and colloquial language, the definitions for which I've sometimes never found! Quite the guy! :-) - John R.
Feb 25 2005
parent reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
FMI: is Honk! a widely recognised thing?

In case it's not: it represents the noise of a goose, for when one, or 
one's correspondent, is being a goose. It's particularly attractive for 
the reason that it is impossible to emit a Honk! that contains any 
malice.



"John Reimer" <brk_6502 yahoo.com> wrote in message 
news:cvo8ra$1nns$1 digitaldaemon.com...
 There!  See?  See?  Like that!

 Matthew wrote:
 Honk!

 "John Reimer" <brk_6502 yahoo.com> wrote in message 
 news:cvo4p8$1jcg$1 digitaldaemon.com...

Matthew wrote:

"Paul Bonser" <misterpib gmail.com> wrote in message 
news:cvo141$1fjg$1 digitaldaemon.com...


Matthew wrote:


Indeed, this is a good example of the type of program for which D 
will
be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P
I do. And that's one of the mild ones! ;)
Matthew likes big words. "Superlative" is indeed a mild one. I don't think it's always appropriate ;-), but it's good exercise for the brain; I know I'm frequently looking up words on the internet dictionary after reading his posts. He also likes using slang and colloquial language, the definitions for which I've sometimes never found! Quite the guy! :-) - John R.
Feb 25 2005
parent John Reimer <brk_6502 yahoo.com> writes:
Well, I knew you were being funny, and that it was. :-)  But I honestly 
didn't even come to close to guessing the true meaning of your 
"honking!"  I thought it was a car "honk."  This must be the a peculiar 
instance similar to the difficulties Walter experiences with icons and 
GUI's :-).

See, Matthew?  You can't win with complicated or simple words.  You just 
pack too much meaning into them, regardless! ;-)

- John R.

Matthew wrote:
 FMI: is Honk! a widely recognised thing?
 
 In case it's not: it represents the noise of a goose, for when one, or 
 one's correspondent, is being a goose. It's particularly attractive for 
 the reason that it is impossible to emit a Honk! that contains any 
 malice.
 
 
 
 "John Reimer" <brk_6502 yahoo.com> wrote in message 
 news:cvo8ra$1nns$1 digitaldaemon.com...
 
There!  See?  See?  Like that!

Matthew wrote:

Honk!

"John Reimer" <brk_6502 yahoo.com> wrote in message 
news:cvo4p8$1jcg$1 digitaldaemon.com...


Matthew wrote:


"Paul Bonser" <misterpib gmail.com> wrote in message 
news:cvo141$1fjg$1 digitaldaemon.com...



Matthew wrote:



Indeed, this is a good example of the type of program for which D 
will
be _the_ superlative language.
Man, if you use words like that in your books, I'm gonna have to be sure to keep a dictionary handy :P
I do. And that's one of the mild ones! ;)
Matthew likes big words. "Superlative" is indeed a mild one. I don't think it's always appropriate ;-), but it's good exercise for the brain; I know I'm frequently looking up words on the internet dictionary after reading his posts. He also likes using slang and colloquial language, the definitions for which I've sometimes never found! Quite the guy! :-) - John R.
Feb 25 2005
prev sibling parent reply "Walter" <newshound digitalmars.com> writes:
"John Reimer" <brk_6502 yahoo.com> wrote in message
news:cvo4p8$1jcg$1 digitaldaemon.com...
 Matthew likes big words.
That would be: Matthew likes [consequential, considerable, eminent, heavy duty, heavyweight, influential, leading, main, major league, material, meaningful, momentous, paramount, powerful, prime, principal, prominent, serious, significant, substantial, super, super colossal, valuable, weighty, ample, awash, barn door, brimming, bulky, bull, burly, capacious, chock-full, colossal, commodious, considerable, copious, crowded, enormous, extensive, fat, full, gigantic, heavy duty, heavyweight, hefty, huge, hulking, humungous, husky, immense, jumbo, king sized, mammoth, massive, monster, mungo, oversize, packed, ponderous, prodigious, roomy, sizable, spacious, strapping, stuffed, substantial, super colossal, thundering, vast, voluminous, walloping, whopper, whopping] words.
Feb 25 2005
next sibling parent reply John Reimer <brk_6502 yahoo.com> writes:
Walter wrote:
 "John Reimer" <brk_6502 yahoo.com> wrote in message
 news:cvo4p8$1jcg$1 digitaldaemon.com...
 
Matthew likes big words.
That would be: Matthew likes [consequential, considerable, eminent, heavy duty, heavyweight, influential, leading, main, major league, material, meaningful, momentous, paramount, powerful, prime, principal, prominent, serious, significant, substantial, super, super colossal, valuable, weighty, ample, awash, barn door, brimming, bulky, bull, burly, capacious, chock-full, colossal, commodious, considerable, copious, crowded, enormous, extensive, fat, full, gigantic, heavy duty, heavyweight, hefty, huge, hulking, humungous, husky, immense, jumbo, king sized, mammoth, massive, monster, mungo, oversize, packed, ponderous, prodigious, roomy, sizable, spacious, strapping, stuffed, substantial, super colossal, thundering, vast, voluminous, walloping, whopper, whopping] words.
lol!.. wow... do I get to pick?
Feb 26 2005
parent "Andy Knowles" <andy.knowles gmail.com> writes:
barn door has to be my favourite :P

"John Reimer" <brk_6502 yahoo.com> wrote in message
news:cvparh$2nt9$1 digitaldaemon.com...
 Walter wrote:
 "John Reimer" <brk_6502 yahoo.com> wrote in message
 news:cvo4p8$1jcg$1 digitaldaemon.com...

Matthew likes big words.
That would be: Matthew likes [consequential, considerable, eminent, heavy duty, heavyweight, influential, leading, main, major league, material,
meaningful,
 momentous, paramount, powerful, prime, principal, prominent, serious,
 significant, substantial, super, super colossal, valuable, weighty,
ample,
 awash, barn door, brimming, bulky, bull, burly, capacious, chock-full,
 colossal, commodious, considerable, copious, crowded, enormous,
extensive,
 fat, full, gigantic, heavy duty, heavyweight, hefty, huge, hulking,
 humungous, husky, immense, jumbo, king sized, mammoth, massive, monster,
 mungo, oversize, packed, ponderous, prodigious, roomy, sizable,
spacious,
 strapping, stuffed, substantial, super colossal, thundering, vast,
 voluminous, walloping, whopper, whopping] words.
lol!.. wow... do I get to pick?
Feb 26 2005
prev sibling parent Manfred Nowak <svv1999 hotmail.com> writes:
"Walter" <newshound digitalmars.com> wrote:
[...]
 P.S. I've never found any IDE that is as productive as the
 command prompt.
[...] You can batch GUIs with automatization tools like autoit from http://www.hiddensoft.com/autoit or autohotkey from http://www.autohotkey.com -manfred
Feb 27 2005
prev sibling parent jicman <jicman_member pathlink.com> writes:
It's also good to handle large xml strings really fast!  :-)

thanks.


In article <cvnuil$1d1r$1 digitaldaemon.com>, Matthew says...
Indeed, this is a good example of the type of program for which D will
be _the_ superlative language.
[clip]
 I have a program with a function downloads a bunch of xml as one huge
 string
 (char[]) and splits that xml into pieces and return a char[][] array.
 What
 happens to that huge string after that function returns the array?
[clip]
 If nothing outside the function references the long string, then it is
 garbage collected.
Feb 25 2005