Skip to content

Instantly share code, notes, and snippets.

@whalebot-helmsman
Created June 17, 2013 23:10
Show Gist options
  • Save whalebot-helmsman/5801320 to your computer and use it in GitHub Desktop.
Save whalebot-helmsman/5801320 to your computer and use it in GitHub Desktop.
int gFetchRaii( ne_request* request
, const std::string& filePath
, const CWebSpiderOptions& options
, CHttpResponse& response )
{
int ret(gFetch(request, filePath, options, response));//call old function without freing resourses
if ((0 != request) and (0 == ne_end_request(request))) {
ne_request_destroy(request);
}
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment