Re: FTP and callback cleanups

From: Henrik Nordstrom <hno@dont-contact.us>
Date: 06 Mar 2003 13:55:32 +0100

tor 2003-03-06 klockan 12.47 skrev Robert Collins:

> As a side effect, I may have broken FTP, due to FTP's use of a
> cbdataFree handler - which really doesn't work well with C++, as the
> compiler may zero objects after delete is called, or otherwise tramp on
> the memory.

Ug.. if you break cbdataFree handlers then quite many things will fail,
and making safe cbdata constructs becomes significantly harder..

In C++ the cbdataFree handler should be called before delete.

On the other hand, we can probably get rid of cbdataFree handlers
entirely in C++ as there is the delete operation which serves the same
purpose. Only need a construct where delete is deferred until the last
reference has gone away.

-- 
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
Received on Thu Mar 06 2003 - 05:55:37 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:30 MST