You are passing in
$booking_dlg to
Wx::Panel::new, which is presumably creating a
Wx::Panel object, which recursively refers to at least 3 other objects. If
any of these other objects saves the reference to
$booking_dlg, then you have a circularity of the form:
$booking_dlg->{booking_main} == Wx::Panel object,
(Wx::Panel object)->{foo} == other object
(other object)->{bar} = $booking_dlg
which will preserve the
Wx::Panel object, the other object, and the
$booking_dlg object forever unless
->{booking_main} gets reassigned sometime later. (and if
$booking_dlg is simply being tossed later on, there's your leak right there)
(Update: Well, okay, it could also be (Wx::Panel object)->{foo} = $booking_dlg directly and the other 3 objects are just being dragged along for the ride. It only takes one such reference to ruin your day...)