Top Posts
Gaia GPS How-To: Using the Click Drawer on...
Meet What’s New in the Web Route Editor 
Introducing Adventure Modes: The Right Map for Every...
Trip Report: A Rider’s Guide to Bikepacking in...
How to Hike a Colorado 14er: A Step-by-Step...
Trip Report: A Rider’s Guide to link Boulder...
Trip Report: A Rider’s Guide to the South...
Battling the Wind: Setting Your Shocks to Firm...
The Hike Map That Broke Me: How Gaia...
A Fond Farewell to National Geographic Maps —...
Gaia GPS
  • Explore The Map
  • Get the App
  • Upgrade Today
  • Explore The Map Catalog
  • New Features
  • Activities
    • Backcountry Skiing
    • Boating
    • Emergency Response
    • Fishing
    • Offroading
  • Adventures
    • User Stories
  • Help
Author

Staff Reports

Staff Reports

Gaia GPS

(Technical Post) How Memory Works on iOS

by Staff Reports May 26, 2011
written by Staff Reports

When you are programming iPhone/iPad apps, the thing that tricks everyone up the most is memory management. If you are a beginner, you are likely to just not know what is going on. If you are experienced, then you find yourself battling obscure memory bugs in errant threads.

It has taken me some time to master, but I have gotten the hang of it, and it boils down to knowing just a few things. Here’s what I know about memory management on iPhone/iPad. Hopefully, this will help someone out, and if I have any errors in my thinking, someone will let me know.

Memory in Objective C

  1. Every time you type “retain” you also need to type “release.”
  2. When you type “alloc” there is an implied retain.
  3. When you type self.foo = bar, there is an implied retain. If you set a class variable without the “self,” there is no implied retain. EDIT: Someone on Hacker News corrected me – there is only an implied retain if you declare the property as retained in the header, with @property(retain).
  4. If you use a convenience method to make an object, then there is an implied “autorelease” and you don’t need a release.

Correct Examples

Each of these examples is correct. The object is properly instantiated, and then later released.

Ex. 1

NSString *foo = [[NSString alloc]init];


...


[foo release];




Ex. 2


NSString *foo = [[[NSString alloc]init]autorelease];


...




Ex. 3


self.foo = [NSString stringWithFormat:@"bar"];


...


self.foo = nil;




Incorrect Examples

All of these examples are wrong.

This example will crash, because foo is over-released:

NSString *foo = [[[NSString alloc]init]autorelease];


...


[foo release];

This will also crash and is over-released:


NSString *foo = [NSString stringWithFormat:@"bar"];


...


[foo release];




A Note on @synthesize

If you declare a class variable as a property in the header, and then synthesize it in the implementation, that will auto-generate getters and setters.

That means when you type:

self.foo = @"bar";

The following is actually happening, and you could even override this method:


- (void) setFoo:(NSString*) bar {


  if(bar == foo) {


    return;


  }


  [foo release];


  foo = [bar retain];


}

EDIT: Corrected the above function based on comment on HN… shows what I know!

So, whenever you call self.foo = bar, there is both a release and then a retain.

Typing self.foo = nil releases and nils the variables.

Just typing foo = nil is a memory leak.

May 26, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

Gaia Devs Married

by Staff Reports May 25, 2011
written by Staff Reports

The blog has been quiet for a few weeks, and we’ve been slow to answer people’s emails, because Anna and I just got married and honeymooned a bit. And since I don’t have anything interesting to blog this week with regards to our apps, that’s my news!

I guess I can also note that just before all the wedding festivities began, we sent out a new release to our awesome beta test group. With their feedback in hand, we’re now working on new Gaia, to be shipped soon.

May 25, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

Gaia wins in the Alps, on all platforms

by Staff Reports May 7, 2011
written by Staff Reports

Looks like the big news in the UK this week, besides that wedding of course, is that Gaia GPS is great in the Alps 🙂

According to Wired UK, “Gaia GPS proved the best app for both platforms…”

It’s always fun to get some nice press! At some point, I need to put a web page on this site that collects all the various articles about our apps and company. We’ve had quite a few at this point.

May 7, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

EFB – Charts and Weather for Aviation

by Staff Reports April 18, 2011
written by Staff Reports

Anna and I spent a good bit of this winter working on EFB – an app for pilots to support paperless mapping in flight. We are working with GlobalNavSource to develop and market the app. You can download it on iTunes or read more about the iPad EFB app on the GlobalNavSource website.

Even if you aren’t a pilot, feel free to check it out. It will be totally free until later this summer, as we collect feedback and work on it.

There are now apps running on the Gaia GPS mapping platform for traveling by land, air or sea! It’s definitely been fun and challenging to understand maps for all the various ways to move around!

April 18, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

How tile-based, Google-style maps work

by Staff Reports April 4, 2011
written by Staff Reports

People often ask me how the maps in Gaia GPS work. Here’s the explanation I gave in email today:

All “Google-style” tile-based maps, which ours are, work as follows.

  • At zoom level 1, the whole world fits on 1 tile.
  • At zoom level 2, the whole world fits on 4 tiles.
  • At zoom level 3, the whole world fits on 16 tiles.
  • At zoom level N, the whole world fits on 4^N tiles.

For the MyTopo maps we use in Gaia GPS, you can fit a pretty big park area or city, with the finest level of detail, in about 10,000 tiles. Those tiles will take up hundreds of megabytes of space on your phone.

In Gaia GPS, you can download as many 100,000 tile chunks (increased from 10,000 on August 17) as you want. Gaia GPS Lite is still limited to 10,000 tiles per download.

April 4, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

Gaia GPS for Android, v2.0

by Staff Reports February 24, 2011
written by Staff Reports

After a long time in development and testing, we have finished Gaia GPS for Android, v2.0. This is a big release because it adds tracking to the app and includes a totally reworked UI.

We used code from Google’s MyTracks open source app to add tracking, stats, and graphs to the app, so hat tip to Google for providing yet another good programming toolkit. Besides tracking, the most striking change is the new home menu:

This release has been in beta for several months now, so if you are an Android Gaia user, check it out. If you haven’t bought the app, you can download the free, ad-supported version.

With these additions, our Android app is much closer in functionality of the iPhone version of Gaia. Up next, we’re working on POI search and GPX exports. Please let us know your suggestions at android@gaiagps.com.

February 24, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

Gaia GPS On Sale for $2.99 to celebrate the Verizon iPhone

by Staff Reports February 10, 2011
written by Staff Reports

Gaia GPS is on sale at it’s original price of $2.99 for a limited time, to welcome all Verizon users to the App Store.

We have continually raised the price of the app over the 20 months we have been working on it, and these days, it usually costs $12.99, which makes it the most expensive hiking on on the App Store by a couple of bucks. We think Gaia GPS is the best GPS app for hikers, and the price tag reflects both the app’s popularity and the long hours we have spent working on it. So, now’s a good time to save ten bucks if you are a hiker 🙂

Gaia GPS and it’s free cousin, Gaia GPS Lite, have been downloaded over 500,000 times. I’m not bashful about saying we make great apps, and many other people will tell you the same. So, if you are going for a hike, make sure you get Gaia GPS before you go.

February 10, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

New version of Gaia out today

by Staff Reports February 8, 2011
written by Staff Reports

Gaia GPS v4.5 went on sale today. Anna and I started working on the app about 20 months ago, and little by little, it’s getting to be a really handy tool. Gaia is definitely the thing I am most proud of making in my entire life, and every time I use it on a hike, it makes me smile.

For this release, we did lots of scrub and polish, and we also overhauled the track/photo emailing functionality to use the native interface. We think people will like being able to compose their track export emails in the normal way, adjust the subject and body, plus this gives better options for sizing photos as they are exported. All in all, I think this is a very nice release.

We have a lot of big plans for the spring and summer. Over the next couple of releases, we’re going to continue to look for bugs, find things to speed up and tweak, and then we’ll have some big features rolling out starting in April or so. We have things like weather, friend-mapping, and offline back-up of track data in the works. Just in time too, because I’m itching for a long trip.

February 8, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

Gaia GPS Video on TappedIn

by Staff Reports February 3, 2011
written by Staff Reports

TappedIn did a video about Gaia GPS for their weekly podcast. You can view the video on YouTube, or you can download it via iTunes as a PodCast. The 1:44 minute short demonstrates how to use the map downloading functionality of Gaia and gives an overview of other features. Actually, we should have done something like this a long time ago, considering we get requests for just such a thing occasionally! We have been meaning to do a video for a while, but we’re always busy with the code.

Anyways, check it out. It’s a cool video and the production values are very high, since TappedIn is a FOX News production. Don’t worry, there’s no political slant to be found in this video… just Gaia GPS rocking out. A big thanks to Kristin Mulgrum of TappedIn for noticing our humble little hiking app.

February 3, 2011
0 FacebookTwitterLinkedinRedditEmail
Gaia GPS

Fine Local Wine hits the App Store

by Staff Reports December 24, 2010
written by Staff Reports

Recently, my friend Tom has been working with us to create a new app. Fine Local Wine is an iPhone wine app (iPad/iPhone universal actually) that uses a similar map interface to Gaia GPS, and plots out many thousands of wineries, along with useful info such as phone numbers, addresses, and websites. You can now buy it on iTunes, and visit the website here.

He has many ideas for cool apps to build, and we’re going to work with him over the next couple of months to and help facilitate. This first app is purely functional – intended to help you find a good winery, and to help Tom get a feel for iPhone development. But he’s looking at more game-related stuff for the next iteration, and I think his next project will be the real homerun. With any luck, we’ll liberate him from his full-time job working for Big Banking 🙂

If you want a cool wine app, or you want to help an indie developer get his start, check out Fine Local Wine on iTunes. All proceeds go to helping Tom quit his job!

December 24, 2010
0 FacebookTwitterLinkedinRedditEmail
Load More Posts

Categories

  • Adventures
  • Android
  • App Comparisons
  • App Updates
  • Backcountry Skiing
  • Boating
  • Company News
  • Emergency Response
  • Featured
  • Fishing
  • Gaia GPS
  • Gaia GPS Offroad Podcast
  • GaiaCloud
  • Hikes
  • How-To
  • Hunting
  • iOS
  • New Features
  • New Maps
  • Newsletter
  • Offroading
  • Out and Back Podcast
  • Overlanding
  • User Profiles

Recent Posts

  • Gaia GPS How-To: Using the Click Drawer on gaiagps.com
  • Meet What’s New in the Web Route Editor 
  • Introducing Adventure Modes: The Right Map for Every Adventure in One Tap
  • Trip Report: A Rider’s Guide to Bikepacking in Bears Ears National Monument
    • Facebook
    • Twitter
    • Instagram
    • Youtube
    • Rss
    • Explore The Map
    • Get the App
    • Upgrade Today
    • Explore The Map Catalog
    • New Features
    • Activities
      • Backcountry Skiing
      • Boating
      • Emergency Response
      • Fishing
      • Offroading
    • Adventures
      • User Stories
    • Help

    @2024 - All Right Reserved. Gaia GPS


    Back To Top
    Gaia GPS
    • Explore The Map
    • Get the App
    • Upgrade Today
    • Explore The Map Catalog
    • New Features
    • Activities
      • Backcountry Skiing
      • Boating
      • Emergency Response
      • Fishing
      • Offroading
    • Adventures
      • User Stories
    • Help