Close
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
Read Down
Sign in
Close
Welcome!Log into your account
Forgot your password?
Read Down
Password recovery
Recover your password
Close
Search
Logo
Logo
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
More
    Home Applications
    • Applications
    • Development
    • Mobile
    • Networking

    Garbage Collection

    By
    Darryl K. Taft
    -
    July 11, 2012
    Share
    Facebook
    Twitter
    Linkedin

      eWEEK content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

      PrevNext

      1Garbage Collection

      1

      Objective-C has all the benefits of Java (no memory management hassles for the programmer), but it has the deterministic resource release of C++. It accomplishes this feat of magic through Automatic Reference Counting (ARC). Also, this means that there are no “garbage collection stalls” or program stuttering because there isn’t any garbage collection. Resources are released when no longer needed. ARC is built into the compiler/IDE (integrated development environment) tooling so the programmer doesn’t have to keep track of things.

      2Build Speed

      2

      Objective-C builds are very fast and allow very quick testing/iteration.

      3Simplicity of Source Code, Artifacts

      3

      With Objective-C, developers can still typically have header files (.h) and implementation (.m), but the IDEs manage these nicely and the separation maintains the ability to publish an interface to proprietary code without giving away the crown jewels. With Java, you have to obfuscate to get the same effect.

      4Binary Standard?

      4

      Objective-C is compiled for a specific architecture so it’s fast but doesn’t run in a virtual machine (VM). However, this is hardly an issue. The same code compiles for Mac (Intel) and for iOS (ARM). There are different binaries, but that’s just a matter of having a compiler. Native code will always win the speed/size race over VM’s. The important point here is that the programmer doesn’t care. They just select the desired hardware target and go. So the code can be written once and used elsewhere. That’s admittedly not the same as running the identical binary anywhere, but if performance counts, you get a better result with native code.

      5Dynamic Linking

      5

      Objective-C does dynamic linking.

      6Portability

      6

      Objective-C is one of the GNU languages and runs on many platforms (including Linux) although it is clearly dominant on the Mac and iOS platforms. One thing that is really nice is that the same tooling/knowledge gives developers access to both the Mac (Intel) and iOS (ARM) worlds. Developers get mobile and desktop with one investment in language. Many of the classes you write for one are completely portable to the other because, as a developer, you’re programming both with the same language.

      7Standard Type System

      7

      Objective-C has standard types.

      8Reflection

      8

      This is handled a bit differently in Objective-C but developers have the ability to query objects at runtime with respect to their capabilities. This allows for the same kind of generalization and framework creation.

      9Performance

      9

      Objective-C typically will blow the doors off C++/Java because it ends up being bad-fast C code under the covers, said Babcock. “So from my perspective, I get the performance of bad fast C code with the convenience/efficiency of programming in a sane OO [object-oriented] language.”

      10Safety

      10

      Objective-C takes most if not all the memory management considerations off the back of the programmer. Developers can do “C” things, if needed, but they are rarely if ever needed. ARC lets the programmer just assign/create objects without worrying about allocation, “sizeof,” free, etc. Developers don’t have to remember to code a destructor. This is all done for you, so developers can focus on the objects and object-oriented behavior rather than managing memory.

      11Startup Time

      11

      Objective-C startup time is comparable to fast C code—because it fundamentally is fast C code under the covers.

      12Memory Footprint

      12

      Objective-C has all the advantages of C—it uses up to two times less memory than Java—without the warts.

      13Deterministic Destruction

      13

      Not only is destruction deterministic, it is automatic unless you specifically intervene for your own reasons. You can do that if it is required for some reason to keep an object around, but that’s seldom the case. Deterministic destruction is useful for managing resources.

      14Native Integration

      14

      Objective-C plays very nicely with C—because it is fundamentally is C—and OS callbacks.

      15General Fundamental Support for Key Components

      15

      Objective-C features support for networking, XML, databases, etc.

      16Threads

      16

      Objective-C does threading very nicely with minimal burden on the programmer. But an even better solution is available in the Apple world since they built Grand Central Dispatch into the OS. That’s the real answer, said Babcock. “You don’t want to be bothered as a programmer with setting up threads,” he said. “You just want to say: ‘This piece of code can be run in parallel,’ and perhaps provide additional information about other parallel pieces that are supposed to come before, after or wait upon one another. Ultimately, it’s about optimal resource use. The OS by definition controls the resources, memory, CPU cores, etc. So by definition, the OS is the place where the “dispatching” of these resources should occur, not the individual program. At the moment, Objective-C on Apple platforms is the only game in town that allows the programmer to fully take advantage, whatever resources the machine has without a priori knowledge ‘baked into’ their code.”

      PrevNext

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      MOST POPULAR ARTICLES

      Artificial Intelligence

      9 Best AI 3D Generators You Need...

      Sam Rinko - June 25, 2024 0
      AI 3D Generators are powerful tools for many different industries. Discover the best AI 3D Generators, and learn which is best for your specific use case.
      Read more
      Cloud

      RingCentral Expands Its Collaboration Platform

      Zeus Kerravala - November 22, 2023 0
      RingCentral adds AI-enabled contact center and hybrid event products to its suite of collaboration services.
      Read more
      Artificial Intelligence

      8 Best AI Data Analytics Software &...

      Aminu Abdullahi - January 18, 2024 0
      Learn the top AI data analytics software to use. Compare AI data analytics solutions & features to make the best choice for your business.
      Read more
      Latest News

      Zeus Kerravala on Networking: Multicloud, 5G, and...

      James Maguire - December 16, 2022 0
      I spoke with Zeus Kerravala, industry analyst at ZK Research, about the rapid changes in enterprise networking, as tech advances and digital transformation prompt...
      Read more
      Video

      Datadog President Amit Agarwal on Trends in...

      James Maguire - November 11, 2022 0
      I spoke with Amit Agarwal, President of Datadog, about infrastructure observability, from current trends to key challenges to the future of this rapidly growing...
      Read more
      Logo

      eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site’s focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

      Facebook
      Linkedin
      RSS
      Twitter
      Youtube

      Advertisers

      Advertise with TechnologyAdvice on eWeek and our other IT-focused platforms.

      Advertise with Us

      Menu

      • About eWeek
      • Subscribe to our Newsletter
      • Latest News

      Our Brands

      • Privacy Policy
      • Terms
      • About
      • Contact
      • Advertise
      • Sitemap
      • California – Do Not Sell My Information

      Property of TechnologyAdvice.
      © 2024 TechnologyAdvice. All Rights Reserved

      Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

      ×