3 ms·
It looks to me in the C version, he only frees the first listener. The C++ version also provides the listeners as a set. The C version doesn't mind if you add t
by arghnoname 17y ago
It looks to me in the C version, he only frees the first listener. The C++ version also provides the listeners as a set. The C version doesn't mind if you add the same listener multiple times, so to be apples to apples you'd use a vector, but the code wouldn't change otherwise, so no problem there.
- wheels 17y ago- That's an array of pointers; the listeners themselves aren't malloced - The set / list difference is noted just below the code samples