mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-03 17:30:42 +00:00
Prevent accidental deallocation of contentView in custom window subclass.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21509 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a1d682123a
commit
1a5b4d4dc3
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-07-21 08:33 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* Source/GSNibTemplates.m: in GSWindowTemplate initWithCoder:,
|
||||||
|
temporarily retain, then release (after setting back into the window)
|
||||||
|
the content view to prevent it from being inadvertantly deallocated.
|
||||||
|
|
||||||
2005-07-17 Adam Fedor <fedor@gnu.org>
|
2005-07-17 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Source/NSApplication.m (gnustep_backend_path,
|
* Source/NSApplication.m (gnustep_backend_path,
|
||||||
|
|
|
@ -840,6 +840,7 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN
|
||||||
|
|
||||||
// if we are not in an interface builder, call
|
// if we are not in an interface builder, call
|
||||||
// designated initializer per spec...
|
// designated initializer per spec...
|
||||||
|
RETAIN(contentView); // prevent view from being deallocated.
|
||||||
obj = [obj initWithContentRect: [contentView frame]
|
obj = [obj initWithContentRect: [contentView frame]
|
||||||
styleMask: [obj styleMask]
|
styleMask: [obj styleMask]
|
||||||
backing: [obj backingType]
|
backing: [obj backingType]
|
||||||
|
@ -847,6 +848,7 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN
|
||||||
|
|
||||||
// set the content view back
|
// set the content view back
|
||||||
[obj setContentView: contentView];
|
[obj setContentView: contentView];
|
||||||
|
RELEASE(contentView); // release view.
|
||||||
}
|
}
|
||||||
|
|
||||||
// autoposition window
|
// autoposition window
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue