Significance of #autoreleasepool in iOS 6 - nsautoreleasepool

Older version of XCode, if you remove autorelease pool code in main.m the application used to crash. But now even if I dont have any statement such as #autoreleasepool in main.m then also the app works fine. What has changed? I tried with ARC and without ARC both

The Objective-C runtime installs an "autorelease pool of last resort" for you. It's best not to rely on it.

Related

unable to run exe created in Qt 5.3 on different windows machine

I am facing issues to run .exe files created in Qt 5.3 on different windows system. I have included all the .dll files. The issue is that on the latest system with graphics card support the application runs without any issues but on older systems it just gives blanck screen.
I suspect that this has something to do with openGL support for the system.
Is there a way where I can make sure that the application runs without any glitches on all the systems?
Or is it possible to have an application created without oprnGL support needed ?
Hoping to hear some solution for this.
Thanks in advance.
EDIT:
Following is the error I get when I run the code
getProcAddress: Unable to resolve 'glBindFramebuffer'
getProcAddress: Unable to resolve 'glBindFramebufferOES'
getProcAddress: Unable to resolve 'glBindFramebufferARB'
and here is the screenshot of the way the screen looks
NOTE :
Please note that when I run the .exe on a new system with updated graphics, the screens looks perfect.
Did you include any OpenGL headers in your Qt Project?
Because if you did then there is obviously going to be a dependency on OpenGL for each system and if one of them cannot support this then you either need to decrease the minimum version of GL you are using or remove these headers altogether. It is also worth noting that no matter how hard you try - you will never get the same version of OpenGL to run across every piece of hardware without having to change something.
Did you add the QtOpenGL module?
From what is sounds like, you are not using OpenGL in your application. If this is true then you should remove this module from your .pro file and it should remove the dependency.
I hope this answers your question. If not, could you provide a little more detail because your question was slightly vague.

WP8 app crashes after downloaded from store

Recently I created an app that uses background agent and live tiles in it. The problem is - the application works perfectly when I straight away deploy the XAP file to device(or emulator) but when I download the same app from store, then the app exits without even navigating to MainPage.
Is this because of background agent or anything else, I don't know am totally confused in this. Can anybody please help with this?
If you're application uses a periodic Background Agent and you are testing it with the LaunchForTest method you should make sure that you are not calling this in your release build of the code.
Protect it with appropriate conditional compile time checks:
#if DEBUG
ScheduledActionService.LaunchForTest(periodicTaskName, TimeSpan.FromSeconds(1));
#endif
Note that DEBUG is defined by default in the "Debug" configuration and not in the "Release" one for situations such as this.
Answered by Matt Lacey - https://stackoverflow.com/a/15339129/1392194

CodeTyphon, Typhon32 Big IDE Not Starting

I have compiled and recompiled the big IDE of Typhon32 numerous times and still the big IDE will not start, It doesnt even give a warning all that happens is the splash screen loads and then nothing happens not even a process of Lazarus is running. i dont have anything else installed for example no extra cross compiles have been installed and so on. Please Help I would like to start using this innovative tool. Thanks: Gareth
Try to remove all references to other fpc and/or lazarus installations from your PATH. Probably the CT batch installer finds another fpc ad uses this other one instead the compiler packaged with CodeTyphon

How to implement Async NPAPI plugin

I have to implement HTML5 AsyncFileAPI using plain NPAPI. Also Callback mechanism for Microsoft Gamepad key events.
Problem I am facing is how to implement threadcallasync and seemlessly send data to javascript from plain NPAPI plugin. Some useful links or working code will be appreciated. I am new in NPAPI plugin. threadcallasync I have to implement in Linux, have seen some links to implement in windows.
I would definitely recommend using FireBreath for creating your plugin; it would solve most of the hard stuff for you, and you can find tutorials on how to do async calls.
Should you choose not to do that basically you just have to pass in a javascript function, which in NPAPI will be an NPObject, and then when your action is done use NPN_InvokeDefault on the callback NPObject. You will, of course, need to do this on the main thread, which will require some method of sending a message to the main thread to tell it to make the call.
Generally speaking NPN_PluginThreadAsyncCall does this; you give it a function pointer and a void* with the data you'll need and it'll call your function on the main thread. Unfortunately Safari 5.1 on both windows and mac seems to have dropped support for this function. An alternate on windows is to create a message HWND and PostMessage to it with the opaque pointer in the LPARAM. On Mac you can just use PerformSelectorOnMainThread or an NSTimer. I'm not sure how to do that on linux.
Of course, FireBreath takes care of all of that for you and just wraps the callback in a JSObjectPtr which can be called from any thread... you call it and firebreath will make the call on the correct thread for you. it will also work on IE... but that's up to you. I try to give other options, since I wrote most of FireBreath and I'm a bit biased.
(Just because I'm biased does not mean I'm wrong)
good luck!

Flash Builder 4 changes not compiled

Im using Flash Builder 4 on the Mac and I have a worrisome problem: The compiler is sometimes not detecting my code changes.
For example I might write some code, compile and run, then add some logging statements, but they will not print. After a clean compile everything runs as expected.
I cannot see a pattern to the exclusion of changes. I'm wondering if anyone else is having the same problem?
Details:
Flash Bulider 4
Pure AS3 project targetting Flex3.5 SDK
Max OS X Snow Leopard
My code does not use semicolons to terminate statements
The problem is with the SDK settings selected for the Compiler.
Try going to 'Project' > 'Properties' > 'ActionScript Compiler'.
Now, in the 'Flex SDK section', try changing the SDK. Click on 'Apply'.
This will force FB to rebuild all settings for the project.
You can try again. FB should now have started compiling with latest code changes again.
Please Note: This is not a permanent fix though!
In case the problem re-occurs, you'll need to again perform the steps mentioned above to get FB back on track.
As bad as it sounds, I am now used to this behavior, I use FB4 on a Mac , but remember having the same issue with Flex.
Practically, I keep clearing the browser cache and cleaning the project. I have thought about adding some random number after the swf url so that it never gets cached but haven't implemented it yet. Force of habit I guess, clearing the cache & cleaning the project has become such a routine!