Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-29 Thread Roman Kennke
On Fri, 29 Sep 2023 02:56:07 GMT, David Holmes wrote: > > > Hmmm okay - it seems fragile to have a psuedo-destructor in release(). > > > > > > I don't know what this comment means. > > Object lifetimes should be well managed such that you can't use an object > after it has been "destroyed". M

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-28 Thread David Holmes
On Thu, 28 Sep 2023 11:58:23 GMT, Coleen Phillimore wrote: > > Hmmm okay - it seems fragile to have a psuedo-destructor in release(). > > I don't know what this comment means. Object lifetimes should be well managed such that you can't use an object after it has been "destroyed". Methods like

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-28 Thread Coleen Phillimore
On Thu, 28 Sep 2023 01:46:37 GMT, David Holmes wrote: > Hmmm okay - it seems fragile to have a psuedo-destructor in release(). I don't know what this comment means. It was fragile to *not* have release destroy the _obj pointer, which was the cause of the original confusion and problems while

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-27 Thread Kim Barrett
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-27 Thread David Holmes
On Wed, 27 Sep 2023 12:19:31 GMT, Coleen Phillimore wrote: > OopHandles and WeakHandles don't have destructors Hmmm okay - it seems fragile to have a psuedo-destructor in `release()`. - PR Comment: https://git.openjdk.org/jdk/pull/15920#issuecomment-1738324423

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-27 Thread Coleen Phillimore
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-27 Thread David Holmes
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-26 Thread Coleen Phillimore
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

Re: RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-26 Thread Roman Kennke
On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore wrote: > This change makes WeakHandle and OopHandle release null out the obj pointer, > at the cost of making the release function non-const and some changes that > propagated from that. This enables ObjectMonitor code to test for null to >

RFR: 8309599: WeakHandle and OopHandle release should clear obj pointer

2023-09-26 Thread Coleen Phillimore
This change makes WeakHandle and OopHandle release null out the obj pointer, at the cost of making the release function non-const and some changes that propagated from that. This enables ObjectMonitor code to test for null to see if the obj was already released, and seems like the right thing t