Yup, they do what C# does with the constructor: they put make a *separate* function, createHandle(), used to create the control.

And they simply *don't* tie the destructor to DestroyWindow(); instead, they just assume the user will call dispose().> So in other words, they just ignored the entire problem with the lifetimes, and hoped ("required"?) that the user will call dispose().

Actually, in WinForms, closing the application's main Form
triggers its Dispose method, which disposes of child Controls too.

Reply via email to