aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-07 00:39:56 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-07 00:39:56 +0000
commit1d92d2c813b9acb94ea6c145171782f5d3ec90f2 (patch)
tree071b4a98d91cb6be5f49c39c1799790c8b502d69 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent7e47cc7cda30d0a8f7c7098033fd88c66c01a9a9 (diff)
downloadllvm-1d92d2c813b9acb94ea6c145171782f5d3ec90f2.zip
llvm-1d92d2c813b9acb94ea6c145171782f5d3ec90f2.tar.gz
llvm-1d92d2c813b9acb94ea6c145171782f5d3ec90f2.tar.bz2
This commit reflects changes to the retain/release checker motivated by my
recent discussions with Thomas Clement and Ken Ferry concerning the "fundamental rule" for Cocoa memory management (http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html). Here is the revised behavior of the checker concerning tracking retain/release counts for objects returned from message expressions involving instance methods: 1) Track the returned object if the return type of the message expression is id<..>, id, or a pointer to *any* object that subclasses NSObject. Such objects are assumed to have a retain count. Previously the checker only tracked objects when the receiver of the message expression was part of the standard Cocoa API (i.e., had class names prefixed with 'NS'). This should significantly expand the amount of checking performed. 2) Consider the object owned if the selector of the message expression contains "alloc", "new", or "copy". Previously we also considered "create", but this doesn't follow from the fundamental rule (discussions with the Cocoa folks confirms this). llvm-svn: 61837
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions