Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread Steven Craighead
How difficult is it to create a stack that can control the order of objects being created and destroyed so you prevent leaks? Can you add a new method on your base class that is inherited to all children to track this? Sent from my iPad > On Dec 4, 2018, at 6:54 PM, David Roe wrote: > > >

Re: [sage-devel] Re: Weak references in the coercion modeled

2018-12-04 Thread steven . craighead
No sarcasm intended. I used to work at a software development firm and we were forced to use c++. Most of the back and forth that I have been observing with the team is around memory leaks and I just wondered if that is due to your development language choice. Hence, my comment. However, if

Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread David Roe
On Tue, Dec 4, 2018 at 9:06 PM wrote: > Would it be advisable to change the base programming language to one that > does automatic garbage collection instead of having to check to see if a > class has been properly disposed like it appears from all of these related > bugs? > I can't tell if

Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread steven . craighead
Would it be advisable to change the base programming language to one that does automatic garbage collection instead of having to check to see if a class has been properly disposed like it appears from all of these related bugs? Sent from my iPhone > On Dec 4, 2018, at 12:44 PM, Jeroen Demeyer

Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread Jeroen Demeyer
On 2018-12-04 18:06, Nils Bruin wrote: Tripledict does that to some extent (with its keys): if one of the key parts gets deallocated, the weakref callback removes the strong reference to the value. Yes, but then we potentially end up again in the situation where things are *only* weakly

Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread Nils Bruin
On Tuesday, December 4, 2018 at 1:50:19 AM UTC-8, Jeroen Demeyer wrote: > > On 2018-12-03 17:21, Nils Bruin wrote: > > In order to > > make that possible, the coercion map (referenced strongly on the > > codomain -- it needs to be strongly referenced somewhere to keep it > > alive) must not

Re: [sage-devel] Re: Weak references in the coercion model

2018-12-04 Thread Jeroen Demeyer
On 2018-12-03 17:21, Nils Bruin wrote: In order to make that possible, the coercion map (referenced strongly on the codomain -- it needs to be strongly referenced somewhere to keep it alive) must not hold a strong ref to the domain. I wonder if there is a way to somehow reference an object