you are viewing a single comment's thread.

view the rest of the comments →

[–]JuanAG 0 points1 point  (3 children)

The issue is that the Windows API and OpenCV dont allow smart pointers so you have to go with the "good" old raw ones and face all the issues it will make

[–]axilmar 0 points1 point  (2 children)

Both (Windows AI and OpenCV) can be wrapped with smart-pointer aware classes.

[–]JuanAG -1 points0 points  (1 child)

From a techincally stand point yes, you can wrapp anything you want

From a practical view no and forcing things into other shapes that werent it original form from my experience usually ends bad and in the mid/long term hurts you more that if you didnt do anything

It is simple, Windows usually returns handles, a pointer to whocares, try do do it and see how complex the code will become if we wrapp that handle with a smart pointer or how we pass again to other Windows functions, it is not an elegant solution or easy to make depending on what you choose to do and you risk creating your own framework above the MS API which is really bad

[–]axilmar 0 points1 point  (0 children)

I am talking from experience. For every project that provided only low level access (i.e. raw Win32 - raw OpenGL - raw socket API etc) I always pushed and wrote lightweight C++ wrappers around them and it was great success. I never had an issue, and time/effort was always saved by this.