ARTCGFloatArray.h 629 B

123456789101112131415161718
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. // A little helper to make sure we have the right memory allocation ready for use.
  8. // We assume that we will only this in one place so no reference counting is necessary.
  9. // Needs to be freed when deallocated.
  10. // This is fragile since this relies on these values not getting reused. Consider
  11. // wrapping these in an Obj-C class or some ARC hackery to get refcounting.
  12. typedef struct {
  13. size_t count;
  14. CGFloat *array;
  15. } ARTCGFloatArray;