newbie memory management
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xcode 3.1, Leopard, Intel, garbage collector My program acts like a jukebox sometimes, playing one cut after another. Every time it starts a new one, the memory usage (as reported by ActivityMonitor) goes up by the size of the cut's sound file. And after not too long, my program ends up in swap and loses control of things. I've tried setting the pointer to the NSSound to nil and manually triggering the garbage collector, but that seems to have no effect at all. The only way I can find to get rid of the playlist is to abort the program and relaunch it. Any suggestions what I'm doing wrong? - -- Glenn English [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhtJEsACgkQ04yQfZbbTLbw4wCfYxknc1dpryVwdQow6r3olJ3I ALcAoIw31M5Quv3u/Kvwv3gH6BL2ygI/ =T69+ -END PGP SIGNATURE- ___ 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: inconsistent float behaviour
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nick Zitzmann wrote: > > On Oct 10, 2008, at 5:04 AM, Steven Hamilton wrote: > >> Am I totally misunderstanding something about floats? Or is the extra >> ##'s in the formatter making things up? > > > Floating point values of either float or double are not guaranteed to be > super precise, and should never be used to represent currency values. > Try using a long long instead, and have the first two digits represent a > fractional unit of currency. Keep in mind that despite the decimal point (US $$), money is an integer. If you're using a 64 bit int, there's room to shift it over 8 bits or so to give a little roundoff space for division and percents and the like. Unless you're working with your losses in the stock market (Oct 2008)... - -- Glenn English [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjvkQ4ACgkQ04yQfZbbTLYj8QCdEHM8nQplWqwsLHn9j8yCcqmT qvIAn12OoUgbvZURYvP+VOnU3/h2CuV2 =8jm1 -END PGP SIGNATURE- ___ 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]