Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Identity of implicitly created objects. #8

Open
stassats opened this Issue Oct 30, 2013 · 0 comments

Comments

Projects
None yet
1 participant
Owner

stassats commented Oct 30, 2013

(with-objects ((message-box (#_new QMessageBox)))
    (let ((added (#_addButton message-box(#_QMessageBox::Yes)))
          (fetched (#_button message-box (#_QMessageBox::Yes))))
      (values (eq added fetched)
              added
              fetched)))
=>
NIL
#<QPushButton 0x7FFFE8111D00>
#<QPushButton 0x7FFFE8111D00>

The same object is not EQ.
Just caching all returned values is not going to work since they are not removed upon being freed, causing subsequent clashes.
Capturing all ChildAdded events and keeping track of them and deleting them when the parent is deleted is an option, but it may be too expensive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment