开发者

OpenAL causing leaks in my iPhone game

开发者 https://www.devze.com 2022-12-24 16:08 出处:网络
I am integrating OpenAL in my iPhone game from code I found in this post, but the compiler gave me an error on this line of code:

I am integrating OpenAL in my iPhone game from code I found in this post, but the compiler gave me an error on this line of code:

unsigned char *outData = malloc(fileSize);

so I changed it to this:

unsigned char *outData = (unsigned char*) malloc(fileSize);.

This got rid of the compiler errors, but seems to have thrown up two leaks:

Malloc 32 Bytes 0x505cb40 AudioToolbox SimAggregateDevice::CreateAggregateDevice(__CFString const*, __CFString const*, unsigned long&)

and

NSCFDictionary 0x505be30 64 AudioToolbox SimAggregateDevice::CreateAggregateDevice(__CFString const*, __开发者_开发技巧CFString const*, unsigned long&)

Is this due to me changing the unsigned char line? I would be very grateful if someone could help me to remove these leaks.


I'm assuming you are using a .mm file instead of a .m (It's the only reason I can think that the compiler will yield an error without the cast). The change you made will have no effect on memory management, and will certainly not cause the leak. Are you freeing this data after using it?

0

精彩评论

暂无评论...
验证码 换一张
取 消