Re: [Maya-Python] Re: C++ already deleted

2024-03-25 Thread Justin Israel
On Tue, Mar 26, 2024, 5:35 AM Juan Cristóbal Quesada < juan.cristobal...@gmail.com> wrote: > i just ask chatgpt what good practices are. > i m glad to know that keeping a "global" reference prevents them to be > deleted. > Apart from what Justin said regarding the parent-child relationship. > I gu

Re: [Maya-Python] Re: C++ already deleted

2024-03-25 Thread Juan Cristóbal Quesada
i just ask chatgpt what good practices are. i m glad to know that keeping a "global" reference prevents them to be deleted. Apart from what Justin said regarding the parent-child relationship. I guess that is all we should care about. I had a very specific use case, where a derived QWidget class w

Re: [Maya-Python] Re: C++ already deleted

2024-03-25 Thread Juan Cristóbal Quesada
When working with PySide objects, especially when interacting with Qt objects implemented in C++, it's important to handle references correctly to avoid memory issues and potential segmentation faults. Here are some good programming practices to follow: 1. Parenting: Assign a parent to PySide o