www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - nogcclass? (Way to solve bugs regarding destroy)

reply 12345swordy <alexanderheistermann gmail.com> writes:
ATM the destroy function can't be called in a  nogc context, 
severely handicap the use of the  nogc attribute. Can we add a 
 nogcclass attribute for classes or at the very least have  nogc 
attribute apply stricter rules when applying to an entire class?
Rules such as checking to see if every member variable and 
function is  nogc recursively until the base class that it's 
inherited from.
Nov 18 2017
parent user1234 <user1234 12.nl> writes:
On Saturday, 18 November 2017 at 20:06:28 UTC, 12345swordy wrote:
 ATM the destroy function can't be called in a  nogc context, 
 severely handicap the use of the  nogc attribute. Can we add a 
  nogcclass attribute for classes or at the very least have 
  nogc attribute apply stricter rules when applying to an entire 
 class?
 Rules such as checking to see if every member variable and 
 function is  nogc recursively until the base class that it's 
 inherited from.
That's known: https://issues.dlang.org/show_bug.cgi?id=17297. It cant be solved easily. Even the experiemental allocator `dispose()` function cant be nogc.
Nov 18 2017