CDT::sweep_ why in heap memory?

37 views
Skip to first unread message

Andrey Diduh

unread,
Apr 10, 2014, 8:09:17 AM4/10/14
to poly...@googlegroups.com
Why you keep 

  SweepContext* sweep_context_;
  Sweep* sweep_;

in heap memory? I mean, you make new/delete for them. If you need pass constructor parameters for SweepContext you may:
  a) Leave empty constructor and make separate init function.
  b) Init it using c++11 functionality
   CDT::CDT(std::vector<Point*> polyline) : sweep_context_(polyline){}

I ask this, because I want to reuse CDT class, and I don't see how.

zzzzrrr

unread,
Apr 10, 2014, 10:26:11 AM4/10/14
to poly...@googlegroups.com
Excellent - feel free to hack/roll your own implementation that meets your exact requirements. This is Open Source after all.

Regards,
Mason

Andrey Diduh

unread,
Apr 10, 2014, 11:40:21 AM4/10/14
to poly...@googlegroups.com
Just ask to be sure - no offense. There could be stack overflow issue (under some circumstances), which could force you to move all to heap memory.


--
You received this message because you are subscribed to the Google Groups "poly2tri" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poly2tri+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages