Re: Cant get Garbage Collection to work

2008-03-29 Thread ugol
  Have you tried using Xcode's build settings instead of manually specifying
  the compiler flag? There might be more to it than just -fobjc-gc-only.

no, that's the only option needed

  if you want to use compiler flags in the long term, it's still worth trying
  the build setting, just so you can check the build log to see what flags
  Xcode is using.

my guess is that he's changing in the wrong target, or in the wrong
place and something is overriding. To double check, he should try to
compile from cli

--
uL

Pragmatist
http://blog.ugolandini.com
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cant get Garbage Collection to work

2008-03-28 Thread Quincey Morris


On Mar 28, 2008, at 04:15, Dominik Pich wrote:

First then I set the GCC Flag: Garbage Collection _required_: -fobj- 
gc-only


I coded my cocoa document based application as if there were GC...  
no retain/release and no dealloc..


I started and bigidibam... over-releases -- guess something got  
autoreleased which I ofcourse didnt retain.


Over-releases? There's no such thing with gc-only. (Except, of course,  
CF objects still have retain/release counts, but if you ignore those  
you end up with leaks, not over-releases.)


What are the actual errors you're seeing? Something was logged?

 
___


Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cant get Garbage Collection to work

2008-03-28 Thread Sherm Pendley
On Fri, Mar 28, 2008 at 7:15 AM, Dominik Pich [EMAIL PROTECTED] wrote:

 Hi,
 I started a simple xcode project and wanted to play with GC but cant
 get it to work.

 First then I set the GCC Flag: Garbage Collection _required_: -fobj-gc-
 only


Have you tried using Xcode's build settings instead of manually specifying
the compiler flag? There might be more to it than just -fobjc-gc-only. Even
if you want to use compiler flags in the long term, it's still worth trying
the build setting, just so you can check the build log to see what flags
Xcode is using.

sherm--
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cant get Garbage Collection to work

2008-03-28 Thread Quincey Morris


On Mar 28, 2008, at 11:20, Dominik Pich wrote:


exactly my point :) there shouldn't be 'any' memory related errors.
GC seems to be OFF like my 2. 'check' showed:

I also added this 'check' to my awakeFromNib
if([[NSGarbageCollector defaultCollector] isEnabled])
NSLog(@GC on);
else
NSLog(@GC off);
and according to that GC is off..


But you're still not saying what the errors actually are. They may not  
be an indication that there is a problem with GC, but that a different  
issue has been exposed by turning on GC.


For example, you will get nuisance errors like this:

malloc: free_garbage: garbage ptr = 0x126b5f0, has non-zero refcount  
= 1



in the log when you open a window that uses the system template images  
that IB provides you. AFAIK this is a (harmless) bug in Leopard that  
will get fixed one of these days, and there is nothing to do in the  
meantime except ignore the messages.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cant get Garbage Collection to work

2008-03-28 Thread Robert Douglas
Where do you have GC enabled?  My experience has been that you have to  
set it for each target as the project-level setting gets overridden.


On 28-Mar-08, at 11:20 AM, Dominik Pich wrote:


exactly my point :) there shouldn't be 'any' memory related errors.
GC seems to be OFF like my 2. 'check' showed:

I also added this 'check' to my awakeFromNib
if([[NSGarbageCollector defaultCollector] isEnabled])
NSLog(@GC on);
else
NSLog(@GC off);
and according to that GC is off..

On Mar 28, 2008, at 5:25 PM, Quincey Morris wrote:


On Mar 28, 2008, at 04:15, Dominik Pich wrote:

First then I set the GCC Flag: Garbage Collection _required_: - 
fobj-gc-only


I coded my cocoa document based application as if there were GC...  
no retain/release and no dealloc..


I started and bigidibam... over-releases -- guess something got  
autoreleased which I ofcourse didnt retain.


Over-releases? There's no such thing with gc-only. (Except, of  
course, CF objects still have retain/release counts, but if you  
ignore those you end up with leaks, not over-releases.)


What are the actual errors you're seeing? Something was logged?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/dominik%40pich.info

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rdouglas%40mac.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cant get Garbage Collection to work

2008-03-28 Thread Quincey Morris


On Mar 28, 2008, at 11:42, Robert Douglas wrote:

Where do you have GC enabled?  My experience has been that you have  
to set it for each target as the project-level setting gets  
overridden.


FWIW, I haven't noticed any problem with this on newly-created  
projects. But Xcode is so unreliable in the area, it's certainly a  
possibility worth checking.


The other thing worth checking, that gets me all the time, is that  
it's too easy to change a setting only for the Debug/Release  
configuration you're not actually using. The engineers responsible for  
Xcode could definitely use a hosing-down by the HIG police water  
cannons, but that fantasy belongs on a different dev list.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]