Browse Source

* avoid missing autoreleasepool warnings

git-svn-id: trunk@20311 -
Jonas Maebe 13 years ago
parent
commit
38d5945f12
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/cocoaint/src/IvarSize.pas

+ 5 - 1
packages/cocoaint/src/IvarSize.pas

@@ -1295,7 +1295,10 @@ type
 ;end;
 
 procedure PrintGlue1;
-begin 
+var
+  pool: NSAutoReleasePool;
+begin
+ pool:=NSAutoReleasePool.alloc.init;
  if class_getInstanceSize(TDerivedNSAffineTransform) <> (class_getInstanceSize(NSAffineTransform)+sizeof(pointer)) then
  writeln('size of NSAffineTransform is wrong: ',class_getInstanceSize(TDerivedNSAffineTransform),' <> ',class_getInstanceSize(NSAffineTransform)+sizeof(pointer));
  if class_getInstanceSize(TDerivedNSAppleEventDescriptor) <> (class_getInstanceSize(NSAppleEventDescriptor)+sizeof(pointer)) then
@@ -1945,6 +1948,7 @@ begin
  writeln('size of NSWindowController is wrong: ',class_getInstanceSize(TDerivedNSWindowController),' <> ',class_getInstanceSize(NSWindowController)+sizeof(pointer));
  if class_getInstanceSize(TDerivedNSWorkspace) <> (class_getInstanceSize(NSWorkspace)+sizeof(pointer)) then
  writeln('size of NSWorkspace is wrong: ',class_getInstanceSize(TDerivedNSWorkspace),' <> ',class_getInstanceSize(NSWorkspace)+sizeof(pointer));
+ pool.release;
 end;
 begin
  PrintGlue1;