login about faq

Please note that these 2 pages write "quickGetStr" in different case style:


And a question:
Is it correct (in the sample) that I don't need to release the result of quickGetStr?

asked Aug 26 '14 at 11:11

chilkat's gravatar image

chilkat ♦♦

Each Chilkat C++ method that returns a string has 2 forms: (1) An uppercase form that returns the string in the final output-only "CkString &" argument, and (2) a lowercase alternative form that returns a "const char ". The lowercase alternative returns a pointer to internal memory that can be assured to be valid only after the call (prior to the Chilkat object being deleted, and prior to other lowercase string alternative methods being called). A "const char " should not (and cannot) be deleted by the application. When something is a "const <type> *", it is not deletable and the "const" SHOULD signify that code does not own the memory or it points to something that is not on the heap and therefore should not be deleted.

Both forms of the "QuickGetStr" method are as follows:

bool QuickGetStr(const char url, CkString &outStr);
const char *quickGetStr(const char url);

Likewise, each string property has two forms: (1) a "get_PropName(CkString &outStr)" form, and (2) a lowercase alternative form that is the property name returning a "const char *". For example:

void get_ProxyDomain(CkString &str);
const char *proxyDomain(void); 

answered Aug 26 '14 at 11:20

chilkat's gravatar image

chilkat ♦♦

edited Aug 26 '14 at 11:21

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Aug 26 '14 at 11:11

Seen: 909 times

Last updated: Aug 26 '14 at 11:21

powered by OSQA