Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ios target #1

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Conversation

dodikk
Copy link

@dodikk dodikk commented May 11, 2012

Added iOS library target.
Fixed memory management issues.

@natikgadzhi
Copy link
Owner

Thanks for the request.

And huge thanks for using / patching this. Since i wrote the original XNMaths a couple of years ago for an assignation project without any experience in Mac OS X apps development, it might have lots of non-optimal code, memory mgmt issues and so on.

I've noticed you added an iOS build target and removed cocoa requirements. That' great. But you've also added uikit requirement. Why do you need UIKit if you actually are not using any of UI components? Could we make it work with just foundation / coregraphics?

@dodikk
Copy link
Author

dodikk commented May 12, 2012

  1. UIKit is for CGRect, CGPoint and other stuff like this.
    My colleagues did not have enough time to bother with searching for the correct header. Sorry.
  2. Yes. Your calloc() and unbalanced retain/release calls look suspicious.
    If you still maintain the library please consider using std::vector instead of C-style arrays. And consider adopting ARC for better Objective-C memory management.

@dodikk
Copy link
Author

dodikk commented May 12, 2012

P.S. we've included UIKit for the same reason you've included Cocoa. ;)

@dodikk
Copy link
Author

dodikk commented May 14, 2012

UIKit is required for [ NSValue CGPointValue ] on iOS.
In your case it all was covered by "#import Cocoa/Cocoa.h".
Since it's required, I've moved it to the *.pch files

@dodikk
Copy link
Author

dodikk commented May 14, 2012

Fixed some CubicalSpline related leaks.

@dodikk
Copy link
Author

dodikk commented May 14, 2012

Are you actually going to merge my changes to your own repo?

@natikgadzhi
Copy link
Owner

I don't like the idea of just switching Cocoa to UIKit in master branch. I'd have some time to review the code and adopt better memory mgmt practices, thanks for the concern, but i'd rather have special branch for with the same lib, UIKit included.

If i'll have enough time — i'll just cherry-pick classes we use there from Foundation / etc to not include neither Cocoa nor UIKit.

Нат
[email protected]
+7 (915) 359-27-55

On Monday, 14 May 2012 г. at 18:54, Oleksandr Dodatko wrote:

Are you actually going to merge my changes to your own repo?


Reply to this email directly or view it on GitHub:
#1 (comment)

@dodikk
Copy link
Author

dodikk commented May 17, 2012

More memory leak fixes.
[WARNING] C++ code involved [WARNING]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants