mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-21 01:20:53 -08:00
add note about QLET (important to remember)
This commit is contained in:
parent
40511818ef
commit
c52c34de6c
1 changed files with 19 additions and 0 deletions
|
|
@ -9,6 +9,25 @@
|
|||
;;; (server-request "booking.py"
|
||||
;;; (list (cons "from" "2020-08-01")
|
||||
;;; (cons "to" "2020-08-08")))
|
||||
;;;
|
||||
;;; please note the use of QLET to have all locally created Qt objects deleted
|
||||
;;; when leaving the function body;
|
||||
;;;
|
||||
;;; note also how this is done with function HTTP-PART, where we can't use QLET
|
||||
;;; inside the function for 'QHttpPart', because we need to return the newly
|
||||
;;; created Qt object; in this case, QLET is placed in the caller, see:
|
||||
;;;
|
||||
;;; (dolist...
|
||||
;;; (qlet ((part (http-part param)))
|
||||
;;; (|append|...
|
||||
;;;
|
||||
;;; ...and since we are at it, just a reminder:
|
||||
;;;
|
||||
;;; as you already should know, QLET is crucial for all only locally used Qt
|
||||
;;; objects, because it guarantees two things:
|
||||
;;; - the C++ destructors being called when leaving the QLET body
|
||||
;;; - not leaving around some garbage (GC through finalizing is only implemen-
|
||||
;;; ted for return values from Qt function calls)
|
||||
|
||||
(qrequire :network)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue