1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: NDArrayPool::alloc failing |
From: | Michael Davidsaver <[email protected]> |
To: | [email protected] |
Date: | Fri, 29 Jul 2016 10:37:17 -0400 |
On 07/29/2016 09:29 AM, Mark Rivers wrote: > We could add an NDArray::getReferenceCount method. If you have the array reserved and getReferenceCount=1 then you can be sure all the plugins have released it. A good interface to handle this sort of situation would be for NDArrayPool::alloc() to accept a callback function pointer to "cleanup" the user provided buffer when the NDArray ref. count falls to zero.