• 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
copy and deepcopy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

copy and deepcopy


  • Subject: copy and deepcopy
  • From: Robert Lee Dotson <email@hidden>
  • Date: Mon, 22 Apr 2002 17:50:17 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm writing a small matrix algebra library for use in an image processing toolkit (http://www.cns.nyu.edu/~lcv/texture/), and have a question about implementing a -copy method into the matrix/vector/tensor class. The interface is something like this:

@interface LCVMatrix : NSObject {
int rows,
columns;
float *values;
}

...
@end

If I send [myMatrix copy], will I get two objects with pointers to the same data (values)? Or will I get two objects with distinct yet identical copies of the data? Or will I just crash with a sigbus?

- -- Robert Lee Dotson

"If at first you do succeed, try not to look astonished."
-----BEGIN PGP SIGNATURE-----
Comment: For info see http://www.gnupg.org

iD8DBQE8xIWcnK/PA6kJIZsRAnD+AJ9aCf42GyxWXaMubcwNOJxocKa/dwCguAH6
bHBqQc/UKVPgL3h8iGun9d8=
=SOsf
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: copy and deepcopy
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: "Space" key equivalent for menu items
  • Next by Date: Re: Create an IB "Informational Text" field Programatically
  • Previous by thread: Re: Toolbar item like Finder 'view' item
  • Next by thread: Re: copy and deepcopy
  • Index(es):
    • Date
    • Thread