harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject [drlvm] Why APR string pools for mundane tasks?
Date Fri, 15 Sep 2006 12:44:33 GMT
Inquiring minds want to know...

Why do we need to use APR pools to do what is glorified string 
concatenation?

See ClassLoader::LoadNativeLibrary() where it [thinks it] needs to 
create a 'canonicalized path'.

1) First has to call apr_pool_create().

2) Then it calls port_filepath_canonical().

3) With the return from step #2, it calls env->string_pool.lookup() to 
get the path

4) And then call apr_pool_destroy() to cleanup.

Why not just use std::string "+" or strncat inside 
port_filepath_canonical()?

I honestly don't understand why this element of APR pervades our 
codebase like it does.

geir



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message