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 9004181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:50:39+00:00 2026-06-16T00:50:39+00:00

I can get a method’s implementation by: IMP imp = [self methodForSelector:@selector(foo)]; and I

  • 0

I can get a method’s implementation by:

IMP imp = [self methodForSelector:@selector(foo)];

and I know IMP is basically a function pointer.
Then Can I get the code that pointed?Means save it with NSData or char* or something.
Then I can save out of program and reload it dynamically from file.

thanks.

  • 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-06-16T00:50:40+00:00Added an answer on June 16, 2026 at 12:50 am

    You need to think carefully about what it is that you want to do here and tell us the your motivation. You are correct that the selector is essentially a function pointer. It is possible for you to copy the bytes used to encode the instructions making up the function but there is little benefit for you to do so.

    Carelessly relocating a function will likely not allow it to execute properly. For example, assume that there is a relative branch within your function which reaches outside of the code that you have copied. The target address is resolved/calculated based on the value of the current pc (program counter) and will resolve incorrectly if you simply copy the code.

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

Sidebar

Related Questions

I know result page that uses GET method can be bookmarked while the one
In php, you can get the method's defined variables as an array: function test($a,$b){
In Python I can use get method to get value from an dictionary without
Is there any method I can get the full JSON data from jqGrid when
In Watir you can get WIN32OLE handle of IE window using next method. irb(main):059:0>
Is it true that the WebInvoke attribute can take GET as a method? I
The getRGB() method returns a single int. How can I get individually the red,
i use this method before 1 time. but Now i can not get video
I found the method addAWTKeyListener in the class Toolkit, but I can't get it
Can anyone explain when using an anonymously hosted dynamic method why I get an

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.