Comments (7)
Although I should mention, it just takes a few modifications to get it to compile. Perhaps a separate branch people can fork, if they're working with ARC? Not sure how to proceed with this, all suggestions welcome.
from novocaine.
FWIW I ended up flagging Novocaine's files as no ARC and then simply factored my calls so that any allocations took place outside the blocks (so the blocks call a routine in my ARC context).
from novocaine.
Just to clarify, you don't have to worry about allocations in your client blocks being somehow "non-ARC" just because Novocaine is compiled with ARC disabled. ARC will still track whatever your block is doing, regardless of where it's called from, because the ARC guards are inserted into the block at compile time. Whether the block invoker is ARC or non-ARC doesn't affect anything*, all that matters are the compile settings of the file where the block is defined.
(*Except, in some cases, the autoreleased return value optimization; but that's a matter of performance not correctness, and it only applies when the block returns a retainable type.)
from novocaine.
One way to handle ARC compatibility, if the differences are very slight, would be to use preprocessor #ifs to check for ARC mode and make it compile in both modes.
from novocaine.
Go for it! I don't have any ARC projects right now, so I won't be doing this for awhile, but would love it if you tested this out.
On Apr 24, 2012, at 6:02 AM, Porgery wrote:
One way to handle ARC compatibility, if the differences are very slight, would be to use preprocessor #ifs to check for ARC mode and make it compile in both modes.
Reply to this email directly or view it on GitHub:
#4 (comment)
from novocaine.
I'm working on making Novocaine ARC-compatible and cleaning up the property/ivar structure to follow more modern best-practice conventions (no ivars without a good reason, auto-synthesized properties, correct atomicity and retention, sensible public/private access, etc). In my opinion it is beyond reasonable at this point to mandate that users have a version of XCode modern enough to support these things (XCode 4.4+).
Nearly all new projects I've come across these days use ARC, and for non-ARC projects, ARC can be enabled for compilation on a per-file basis for at least iOS 4.3+, which is also beyond reasonable at this point, especially with iOS 7 on the way. It's a similar case for OSX.
If you think there's a need to support older LLVM, I can add a few preprocessor definitions to check the compiler version and synthesize properties if it's an older version.
from novocaine.
I've created a pull request which makes the project compilable on ARC-enabled targets and keeps the code working for non ARC-projects. However there are still lots of "assign" properties, which may lead to dangling pointers and thus runtime errors.
from novocaine.
Related Issues (20)
- Audio distortion isuue while playing on iphone speaker HOT 1
- 1
- use of @autoreleasepool in renderCallback and inputCallback HOT 1
- inputblock + outputblock + forceOutputToSpeaker = Error: Couldn't render the output unit (-50) HOT 1
- Can't play an audio file that was downloaded from server but the data is the same HOT 1
- Music from the Internet HOT 1
- What exactly comes from the newAudio variable?
- Bluetooth Audio? HOT 3
- updateMeters and averagePowerForChannel equivalents for Novocaine? HOT 2
- Setting deployment target to 8.0 causes demo app to crash HOT 2
- Is there anyway to properly convert the audio array (float*) into UTF 8? HOT 7
- m4a files
- Gapless
- RingBuffer.h - class RingBuffer syntax error HOT 3
- Use of deprecated AudioSession APIs on Novocaine.m HOT 2
- How to 8000hz/16000hz get or put as short* array for audio ?
- Is this library suitable to make a lack-in amplifier from microphone input?
- Couldn't initialize the output unit ('!cat') on Device only HOT 1
- Mac Catalyst (UIKit for Mac) support
- Does default sample rate cause resampling and setting buffer size for minimum latency? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from novocaine.