• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: warning: C++ constructors and destructors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning: C++ constructors and destructors


  • Subject: Re: warning: C++ constructors and destructors
  • From: John Stiles <email@hidden>
  • Date: Wed, 15 Feb 2006 13:43:06 -0800

Actually, be sure to call delete in your -dealloc method.
Don't free objects created by new. It may leak or corrupt the heap, and destructors will not be called.


On Feb 15, 2006, at 1:09 PM, Tim Hart wrote:

Simon,

Declare your instance variables to C++ classes as pointers to instances instead. Then, in your init method, call 'new' as appropriate. Be sure to call 'free' in your '-dealloc' method. That will quiet the warnings.

Tim

On Wednesday, February 15, 2006, at 03:03PM, Simon Brée <email@hidden> wrote:

Hi All,

I've got this warnings when compiling :

/Users/simon/Projets/Magnéto/SBObject/SBAudioFile.h:30: warning: type
`CAStreamBasicDescription' has a user-defined constructor
/Users/simon/Projets/Magnéto/SBObject/SBAudioFile.h:30: warning: C++
constructors and destructors will not be invoked for Objective-C fields


My application works anyway, but does anyone know how to solve it?

Thanks,

Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: warning: C++ constructors and destructors
      • From: Tim Hart <email@hidden>
References: 
 >warning: C++ constructors and destructors (From: Simon Brée <email@hidden>)
 >Re: warning: C++ constructors and destructors (From: Tim Hart <email@hidden>)

  • Prev by Date: Re: Strange file system behavior
  • Next by Date: Re: warning: C++ constructors and destructors
  • Previous by thread: Re: warning: C++ constructors and destructors
  • Next by thread: Re: warning: C++ constructors and destructors
  • Index(es):
    • Date
    • Thread