• 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: graphics in AU
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: graphics in AU


  • Subject: Re: graphics in AU
  • From: Bill Stewart <email@hidden>
  • Date: Mon, 30 Sep 2002 11:27:48 -0700

on 30/9/02 11:01 AM, Urs Heckmann wrote:
>>>
>>> Another thing is, I experience crashes when I open the AU a second
>>> time, obviously by some uncertainty how to dispose off data I have
>>> added to the derived AUCarbonViewBase (the image, that is). Do I have
>>> to take care for superclasses when I implement a deconstructor there?
>>
>> Your destructor should be called for you. You might want to verify
>> this by
>> either putting a printf() in your destructor, or using the debugger to
>> see
>> if your destructor is getting called.
>>
>> We did have a problem in the header (AUCarbonViewBase.h) where the
>> destructor was not declared as virtual. This will be fixed in a
>> subsequent
>> release.
>>
>> I'm currently looking into these issues and will get back to the list
>> with
>> further details shortly.
>>
>> -Michael
>>
>
> The MultitapAUView example doesn't sport a destructor at all, that's
> why I was wondering.
>
> Declaring destructors virtual is new to me (I think it is highly
> un-recommended in VST), but I will check this out by adding the virtual
> flavour in AUCarbonViewBase.h.

If you destroy an object that is typed as an AUCarbonViewBase*, but is
actually a sub-class (yours) and you want that destructor called, then the
destructor HAS to be virtual or the only code that gets executed is that in
AUCarbonViewBase:

// here myObj is some kind of AUCarbonViewBase object
AUCarbonViewBase* p = (AUCarbonViewBase*)myObj;
delete p;

It is common practise in C++ to have destructors virtual when those classes
are sub-classed

Bill

> I look forward to your further details!
>
> Cheers,
>
> ;) Urs
> _______________________________________________
> coreaudio-api mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
> Do not post admin requests to the list. They will be ignored.

--
mailto:email@hidden
tel: +1 408 974 4056

__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: graphics in AU (From: Urs Heckmann <email@hidden>)

  • Prev by Date: Re: Control value passing
  • Next by Date: Re: AU & CodeWarrior Newbie question
  • Previous by thread: AU interface consistency
  • Next by thread: Audio Unit not showing up
  • Index(es):
    • Date
    • Thread