本文整理汇总了C++中StringPool::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ StringPool::clear方法的具体用法?C++ StringPool::clear怎么用?C++ StringPool::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringPool
的用法示例。
在下文中一共展示了StringPool::clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _parseFieldList
void _parseFieldList (const char *str, StringPool &props, StringPool &columns)
{
QS_DEF(Array<char>, prop);
QS_DEF(Array<char>, column);
BufferScanner scanner(str);
props.clear();
columns.clear();
scanner.skipSpace();
while (!scanner.isEOF())
{
scanner.readWord(prop, " ,");
scanner.skipSpace();
scanner.readWord(column, " ,");
scanner.skipSpace();
props.add(prop.ptr());
columns.add(column.ptr());
if (scanner.isEOF())
break;
if (scanner.readChar() != ',')
throw BingoError("_parseFieldList(): comma expected");
scanner.skipSpace();
}
}
示例2: cleanup
//deallocate resources after a request has been completed
void cleanup() {
server->performanceCounters.totalRequestsFinished++;
thr.performanceCounters.totalRequestsFinished++;
req.reset();
resp->reset();
thr._responsePool.put(resp);
resp=nullptr;
sp.clear();
}
示例3: finalize
void finalize() {
thr.performanceCounters.totalRequestsFinished++;
if(resp->closed) {
destruct(); return;
}
req.reset();
resp->reset();
thr._responsePool.put(resp);
resp=nullptr;
sp.clear();
if(keepAlive) {
req.init(s,&sp);
if(req.readRequest({&handler::readCB,this})) readCB(true);
} else {
s.shutdown(SHUT_WR);
buf=(uint8_t*)malloc(4096);
s.repeatRead(buf,4096,{&handler::sockReadCB,this});
}
}