> Hi!
>
> I notice that example code "chat" does not always call
> cppcms::http::response::finalize() before it calls
> async_complete_response().
>
> Will it cause memory leak if cppcms::http::response::finalize() is not
> called before async_complete_response() is called by asynchronous
> applications? If it will, I propose some warnings of its misuse be written
> to the documentation.
In the latest version of this example finalize is not called at all.
It is always called when you call async_complete_response(),
all it does it closes all filters you may use and makes sure all
data is saved properly when for example when you use cache (this
is called automatically as well)
Other then that you don't need this function - at some point
it probably should be declared is internal or private API.
Regards,
Artyom
|