Memory management in mobile apps

Throughout it’s lifetime, an application is allowed to make use of the internal memory, as object instances obtain parts of it for temporary use and then return it. When an objects doesn’t use the memory anymore but refuses to let it go, a memory leak is created.

Common causes of memory leaks

Soon a leak can turn into a flood, as the memory occupation is small, but constant and the gradual loss of memory will make the application unresponsive.

There are a few common causes for which memory leaks happen. Continue reading

Advertisements

Setting the active configuration in Xamarin Studio

Building cross-platform applications in Xamarin Studio, you often need to be working on one single platform at a given moment.

Since Xamarin Studio allows having both iOS and Android projects under the same solution, when building or deploying, they all get compiled. This is not very efficient, since you only want to deploy one platform at a time, either iOS or Android.

The solution configuration specifies how projects in that solution are to be built and deployed. A solution can have multiple configuration mappings specified (build configuration, release configuration etc), each containing a combination of a configuration and a platform.

Continue reading

TeaTimer for Mac

This article will cover how to build a Mac application with Mono.Mac, making use of XCode interface builder and NSComboBoxDataSource. TeaTimer will let us chose a tea variety and it will the time how long it will take to make it.

Open Xamarin studio and start a new project. Select a Mono.Mac application.

Screenshot 2013-10-26 17.00.57

Open the MainWindow.xib, which will be our main application window. This will start up XCode interface builder. From the Object library, drag and drop onto the existing window:

  • a combo box, which will display our tea menu,
  • a button, to start the timer,
  • two labels: one for displaying the current time and one for additional information

Continue reading

How to open multiple instances of Xamarin Studio on a Mac

Normally, Xamarin Studio does not allow multiple solutions being open. You can, however, open multiple instances of Xamarin Studio.

You can type in your terminal the following command:

open -n /Applications/"Xamarin Studio.app" 

This works fine if you need this once, but if you find that you will be doing this on a regular basis, follow the steps below:

Continue reading