Re: [Patch, fortran] PR80477 - [OOP] Polymorphic function result generates memory leak

2018-07-28 Thread Dominique d'Humières
Hi! > great that you managed to solve this one! The patch looks very good to > me, but I'm afraid two details may be missing: > > 1) If the type has allocatable components, those need to be freed first. > … PR86481? Cheers Dominique

Re: [Patch, fortran] PR80477 - [OOP] Polymorphic function result generates memory leak

2018-07-28 Thread Janus Weil
Hi Paul, 2018-07-28 9:32 GMT+02:00 Paul Richard Thomas : > Several attempts, including mine, were made to fix this bug since it > was posted. They were all attacking the wrong place. Instead of > providing the free of the class _data as part of the call to > 'add_a_type' it should be included in t

[Patch, fortran] PR80477 - [OOP] Polymorphic function result generates memory leak

2018-07-28 Thread Paul Richard Thomas
Several attempts, including mine, were made to fix this bug since it was posted. They were all attacking the wrong place. Instead of providing the free of the class _data as part of the call to 'add_a_type' it should be included in the post block of the argument processing in the call to 'assign_a_