I expanded the View and passed it an instance of my Activity so that the view can access some member variables and methods.
But now I think it could be a potential memory leak, because even after the Activity is destroyed, it still has a reference to the view in the member variable and vice versa. Therefore, the garbage collector can never clean them.
However, I saw in some examples and examples of the Google API APIs where they passed Activity in the view as a listener.
, , , , - , , - this . . View, getContext().
this
getContext()
, , GC . onDestroy, , , .. . GC Views. , , , Activity, , GC pass .
View , . , , .
Source: https://habr.com/ru/post/1791482/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1791477/how-to-use-jquery-to-log-values-to-firebug-console&usg=ALkJrhhDrUuov5U_QYMqxqLhNVgHdSOSjACreate xcodeproj - xcodeEmacs find-grep-dired, then automatically isearch-forward with the given regular expression - grepGdata youtube request task - iphoneWPF TreeView с правильными значениями выравнивания - alignmentWhy does my random number generator visit both arrays with the same numbers? - c #Can I resolve a tree conflict with the status of "missing" in SVN not manually? - svnjQuery Toggle on mouseup - javascriptSeam - get connection through (session) em.getDelegate (); - hibernateUIImageviews transparent image collision detection - iphoneAll Articles