Hi Volker, On 2017-09-07, Volker Braun <vbraun.n...@gmail.com> wrote: > First question: The GAP garbage collector might delete objects, or it might > move existing objects around in memory (it is a compacting garbage > collector). If your code contains C pointers to GAP objects, bad things > will happen after that.
If by "pointer to GAP objects" you mean "cdef libGAP_Obj", then my code does contain such pointers. So, I guess I should better use libgap_enter/exit. > Second question: Move the libgap_enter/exit outside of the loop, assuming > that the python functions don't themselves call libgap. If they do, you > will get a "RuntimeError: Entered a critical block twice". In that case, > move the libgap_enter/exit into the loop as far as necessary to have > non-overlapping libgap_enter/exit blocks. Since GapElement_List.__getitem__ (and the functions called by it) doesn't seem to use it, it will probably be fine (couldn't test it yet, though). Thank you for your explanations! Simon -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.