kenz-gelsoft / wxRust2

re-exploration Rust binding to wx
MIT License
77 stars 10 forks source link

Weakref over clone #149

Closed kenz-gelsoft closed 1 year ago

kenz-gelsoft commented 1 year ago

This rewriting is not trivial and is not great as I thought.

wx::Window-derived structs(that behaves like pointer to them) won't Drop(), so purpose of this rewriting is consistency to non-Window wx::Objects' lifetime.

Rewriting to unowned version of binding struct is enough.

kenz-gelsoft commented 1 year ago

Note to myself

kenz-gelsoft commented 1 year ago

Consider keep wx::Windows Clonable as they don't have Drop impl(effectively they are not smart ptr).

This should reduce almost boilerplate code introdubed in this PR.

kenz-gelsoft commented 1 year ago

Splitted to following PRs. closing...