Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3942466
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:39:59+00:00 2026-05-20T00:39:59+00:00

You can call NSPasteboard like this: [pboard declareTypes:types owner:self]; Which means that the pasteboard

  • 0

You can call NSPasteboard like this:

[pboard declareTypes:types owner:self];

Which means that the pasteboard will later ask the owner to supply data for a type as needed. However, what I can’t find from the docs (and maybe I’ve missed something bleeding obvious), is whether or not owner is retained.

In practice what’s worrying me is if the owner is a weak reference, it could be deallocated, causing a crash if the pasteboard then tries to request data from it.

Note: I should probably clarify that I’m interested in this more as an aid to tracking down a bug, than making my app rely on it. But I do also want the docs clarified.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:40:00+00:00Added an answer on May 20, 2026 at 12:40 am

    The docs:

    newOwner

    The object responsible for writing
    data to the pasteboard, or nil if you
    provide data for all types
    immediately. If you specify a newOwner
    object, it must support all of the
    types declared in the newTypes
    parameter and must remain valid for as
    long as the data is promised on the
    pasteboard.

    Translation: The pasteboard may or may not retain the owner. Whether it does is an implementation detail that you should not rely upon. It is your responsibility to retain the owner for as long as it acts as an owner.

    What the docs are saying about “remain valid” actually refers to the proxied contents that you might lazily provide. I.e. if the user were to copy something, you wouldn’t want the owner’s representation of what was copied to change as the user makes further edits with an intention of pasting sometime later.

    The documentation says nothing about the retain/release policy of the owner (nor is there any kind of blanket rule statement). It should be clarified (rdar://8966209 filed). As it is, making an assumption about the retain/release behavior is dangerous.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we can call the Array method in the top level like this Array(something) that
I know that you can call functions using variable names like this: $foo =
I can call variables 2 ways. One is just to do it like this:
Multiply users can call store procedure(SP) , that will make some changes to mytable
Why can you call C/C++ functions like this: (&myAwesomefunction)(arg1,arg2,arg3...); Surely taking the address of
I can call my script like this: python D:\myscript.py 60 And in the script
Let's say I can call a method like this: core::get() . What is the
How can I call a CGI function within a javascript function? Such like this:
I wondered that I can call before_create in a model class altough this method
I have an application which in turn can call another application. In this second

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.