From d542f9d80360043ff8b50d7a6ed00827573017ae Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 10 May 2011 23:34:50 -0400 Subject: [PATCH] Extendig concrete classes should no longer consume an instance id unnecessarily - This is not tested because it would be testing too closely to the implementation --- lib/class_builder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/class_builder.js b/lib/class_builder.js index fc8f7c8..8891786 100644 --- a/lib/class_builder.js +++ b/lib/class_builder.js @@ -321,9 +321,6 @@ function createConcreteCtor( cname, members ) return new ClassInstance(); } - // generate and store unique instance id - attachInstanceId( this, ++instance_id ); - initInstance( this ); this.__initProps(); @@ -335,6 +332,9 @@ function createConcreteCtor( cname, members ) return; } + // generate and store unique instance id + attachInstanceId( this, ++instance_id ); + // call the constructor, if one was provided if ( this.__construct instanceof Function ) {