• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: pointer address changes for no reason
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pointer address changes for no reason


  • Subject: Re: pointer address changes for no reason
  • From: "Ewan Delanoy" <email@hidden>
  • Date: Wed, 11 Apr 2007 09:47:30 +0200 (CEST)
  • Importance: Normal

>It is possible that the OP's problem is due to the object being
>released (not enough retains?) or memory smashed somehow; too bad
>it's hard to tell when watchpoints are busted!

         My guess is that it's the latter rather than the former, because
since the object is
a text field created in a nib I don't need to retain it anywhere in my
code, I just
need to release it in the dealloc method. Notice also below how
"numPagesField" is the only
address that has changed.

                                                                                      Ewan

// Before
(gdb) p self
$3 = (class PrintedPagesController *) 0x4b8d000
(gdb) p *self
$2 = {
  isa = 0x16c60,
  _nextResponder = 0x0,
  _window = 0x4baf790,
  _windowNibName = 0x163e0,
  _document = 0x0,
  _topLevelObjects = 0x3eac430,
  _owner = 0x4b8d000,
  _wcFlags = {
    shouldCloseDocument = 0,
    shouldCascade = 1,
    nibIsLoaded = 1,
    nibNameIsPath = 0,
    RESERVED = 0
  },
  _autounbinder = 0x0,
  _reserved = 0x0,
  tableView = 0x4afec60,
  numPagesField = 0x1739480,
  printedPages = {21, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 0 <repeats 4979 times>},
  oldPrintedPages = {21, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 0 <repeats 4979 times>}
}
(gdb) continue
// After
(gdb) p self
$3 = (class PrintedPagesController *) 0x4b8d000
(gdb) p *self
$4 = {
  isa = 0x16c60,
  _nextResponder = 0x0,
  _window = 0x4baf790,
  _windowNibName = 0x163e0,
  _document = 0x0,
  _topLevelObjects = 0x3eac430,
  _owner = 0x4b8d000,
  _wcFlags = {
    shouldCloseDocument = 0,
    shouldCascade = 1,
    nibIsLoaded = 1,
    nibNameIsPath = 0,
    RESERVED = 0
  },
  _autounbinder = 0x0,
  _reserved = 0x0,
  tableView = 0x4afec60,
  numPagesField = 0x15,
  printedPages = {12, 4, 1, 8, 5, 12, 9, 16, 13, 20, 17, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 0 <repeats 4979 times>},
  oldPrintedPages = {21, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 0 <repeats 4979 times>}
}



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: pointer address changes for no reason
      • From: Michael Babin <email@hidden>
    • Re: pointer address changes for no reason
      • From: Scott Ribe <email@hidden>
References: 
 >Re: pointer address changes for no reason (From: Scott Ribe <email@hidden>)
 >Re: pointer address changes for no reason (From: John Stiles <email@hidden>)

  • Prev by Date: NSArrayController and NSUnarchiveFromData
  • Next by Date: WM_KEYDOWN
  • Previous by thread: Re: pointer address changes for no reason
  • Next by thread: Re: pointer address changes for no reason
  • Index(es):
    • Date
    • Thread