Loading...
libkern/c++/OSArray.cpp xnu-344 xnu-517.9.5
--- xnu/xnu-344/libkern/c++/OSArray.cpp
+++ xnu/xnu-517.9.5/libkern/c++/OSArray.cpp
@@ -72,7 +72,7 @@
 
 bool OSArray::initWithObjects(const OSObject *objects[],
                               unsigned int theCount,
-                              unsigned int theCapacity = 0)
+                              unsigned int theCapacity)
 {
     unsigned int capacity;
 
@@ -100,7 +100,7 @@
 }
 
 bool OSArray::initWithArray(const OSArray *anArray,
-                            unsigned int theCapacity = 0)
+                            unsigned int theCapacity)
 {
     if ( !anArray )
         return false;
@@ -114,7 +114,7 @@
     OSArray *me = new OSArray;
 
     if (me && !me->initWithCapacity(capacity)) {
-        me->free();
+        me->release();
         return 0;
     }
 
@@ -123,12 +123,12 @@
 
 OSArray *OSArray::withObjects(const OSObject *objects[],
                               unsigned int count,
-                              unsigned int capacity = 0)
+                              unsigned int capacity)
 {
     OSArray *me = new OSArray;
 
     if (me && !me->initWithObjects(objects, count, capacity)) {
-        me->free();
+        me->release();
         return 0;
     }
 
@@ -136,12 +136,12 @@
 }
 
 OSArray *OSArray::withArray(const OSArray *array,
-                            unsigned int capacity = 0)
+                            unsigned int capacity)
 {
     OSArray *me = new OSArray;
 
     if (me && !me->initWithArray(array, capacity)) {
-        me->free();
+        me->release();
         return 0;
     }