Scott Bennett benn...@cs.niu.edu wrote:
If your program never frees any memory, then there is never
any garbage to collect.
Last I knew, garbage collection refers to tracking down and
reclaiming allocated memory to which no valid references exist.
The particular example given here is
Sorry for the delay. Medical problem.
Here's what I know.
1) Under FreeBSD 8.x OBJC APPEARS NOT to use garbage collection. I
looked at the source and the GC routines aren't defined anywhere and I
stepped through the assembly language and the allocation routing call
malloc(). There is a
On Wed, 10 Mar 2010 11:14:25 -0800 Nerius Landys nlan...@gmail.com
wrote:
I am compiling this program and running it, and without the release
calls there, it certainly is using up more and more memory every
second. Definitely no garbage collection happening. I then modified
the
Running FreeBSD 8.0 32 bit PAE kernel, latest ports.
My current hobby is to experiment more with Objective-C. I'm
rewriting some of my old Java code in Objectve-C to get a better
feeling for how this language works.
I'm finally able to write, compile, and run Objective-C programs after
learning
On Wed, Mar 10, 2010 at 01:00:59AM -0800, Nerius Landys wrote:
#import GarbageObj.h
int main(int argc, const char *argv[]) {
while (YES) {
GarbageObj *obj = [[GarbageObj alloc] init];
[obj foo]; // foo is does literally nothing.
}
return 0;
}
I am compiling this program
I am compiling this program and running it, and without the release
calls there, it certainly is using up more and more memory every
second. Definitely no garbage collection happening. I then modified
the GNUmakefile to make sure that the option -fobjc-gc was being
passed to gcc, and
What is the content of the header file?
File GarbageObj.h:
#import Foundation/Foundation.h
@interface GarbageObj : NSObject {
}
-(void) foo;
@end
File GarbageObj.m:
#import GarbageObj.h
@implementation GarbageObj
-(void) foo {
}
-(void) dealloc