I have a Pascal object representing the request so it is created for each browser request, and MHD maintains the life cycle of that one. So far so good, but the only problem is about my approach choice, I used the option MHD_OPTION_URI_LOG_CALLBACK to create the object and the MHD_OPTION_NOTIFY_COMPLETED to free that one.
Researching at Google, I've seen some people using this approach too, for example (in C++):
Object life cycle management:
Anyway, I have some doubts. When I set a routine to the MHD_OPTION_URI_LOG_CALLBACK option, is this one always called once time for each request? If so, that's OK, otherwise, which one can I use instead?
Researching more a bit, I've found many examples using the parameter `con_cls` as a flag:
However, this approach is a little bit hard to be maintained in the oriented object programming, and it was the reason that I chose the "first called routine" instead of using the `con_cls` as a flag.