• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. Port: MacOSX
  4. ObjC Memory Management & Java

Page History

Versions Compared

Old Version 5

changes.mady.by.user Mike Swingler

Saved on Jun 09, 2011

compared with

New Version 6

changes.mady.by.user Mike Swingler

Saved on Jun 09, 2011

  • Previous Change: Difference between versions 4 and 5
  • Next Change: Difference between versions 6 and 7
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • ObjC objects that are +alloc'd or -retained are not actually pinned in GC-mode unless they have been CFRetain()'d
    • As a counterpoint, any CFRetain()'d ObjC object must be -released or -autoreleased for it's retain count to remain balanced in RR mode
  • When the Java object is done with the native object, it must be explicitly "hard" CFRelease()'d
    • This balances the "hard" CFRetain() which occurred before it was passed up to Java
  • You need to determine if the object is safe to CFRelease() from any thread, or must only be done from the main AppKit thread
    • In some cases, releasing an object may do nothing but decrease it's retain count, but in other cases it will cause the object's -dealloc or -finalize method to be called, and those may not be any-thread safe if they point to end up releasing AppKit objects
  • The ObjC garbage collector cannot see into the Java heap, and infer if any native objects are still "alive"

...

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 163, "requestCorrelationId": "f6a1e33419d4df86"}